Jax-WS Web services |
|
![]() |
Build with Ant | JAX-WS Web services Samples |
Getting started |
Identifying the directory structure of the Samples build |
Rebuilding and reinstalling the JaxWSServicesSamples.ear file |
One of the great benefits of developing applications on a J2EE
platform is portability. All of the sample programs in the Samples
Gallery are developed on a workstation and run on z/OS systems without
changing one line of Java code. By building J2EE applications on
Intel or on operating systems such as AIX or Linux, a developer can
eliminate the challenges of EBCDIC to ASCII or ASCII to EBCDIC file
conversions.
The availability of tools makes it easy for developers to write and test
on a development workstation and install the enterprise archive (EAR)
files on z/OS systems.
Every WebSphere Application Server for z/OS
customer is entitled to the Application Server media for
multiplatforms. If you install the WebSphere Application Server base product and
the Samples on one of the platforms supported by this package, the gallery you see
is the same. However, there is one difference. When you click sample_name >
Build with Ant > platform > Rebuilding and installing the file, the
instructions to rebuild the EAR file are specific to your platform.
Because text files in an EAR file such as XML, xmi, or JavaServer Pages (JSP)
files, must be in an ASCII format, it is easier to edit those files on an ASCII
machine. If you make changes on an ASCII machine, you can then reinstall
the resulting EAR file on the z/OS platform without an EBCDIC to ASCII
conversion.
Install WebSphere Application Server on the distributed platform of your choice and indicate to install the sample applications. On the Install Sample Applications panel, select Install the sample applications.
Make a backup copy of the <profile_root>/samples/src/JaxWSServicesSamples directory before attempting to modify or rebuild the Samples.
The Samples are installed in the following directories:
<profile_root>/samples/src/JaxWSServicesSamples | Contains the sample source code for the Ping, Echo and MTOM Samples. |
<profile_root>/samples/lib/JaxWSServicesSamples | Contains the Web archive (WAR) files, the Java archive (JAR) files, and the final JaxWSServicesSamples.ear file for Samples. This directory is created after this sample is rebuilt. |
<profile_root>/samples/javadoc/JaxWSServicesSamples | Contains the Samples Javadoc documentation. This directory is created after this sample is rebuilt. |
<profile_root>/samples/bld/JaxWSServicesSamples | Contains the generated class files. These class files are used to generate the final JaxWSServicesSamples.ear file. This directory is created after this sample is rebuilt. |
The JAX-WS Web services Samples Enterprise Archive (EAR) file is provided when WebSphere Application
Server is installed. You do not have to build the Samples before using them.
The following directions describe the steps to rebuild the Samples,
with additional information for modifications.
Running the Samples build script |
Removing and reinstalling the JaxWSServicesSamples.ear file |
To rebuild the JAX-WS WebServices Samples EAR file, perform the following steps:
The Sample is now built.
The buildJaxWSSamples scripts are located in the <profile_root>/bin directory. The scripts set the appropriate class path information and run the Ant build utility. The Ant utility reads the build.xml files, which describe how to build the Samples. Refer to the Apache Ant Web site for additional documentation on the Ant utility.
Use the File Transfer Protocol (FTP) to transfer the binary EAR file to the z/OS server, using the following instructions.
By default, the JAX-WS Web services Sample installs into the <profile_root>/installedApps/<cell
name> directory, where <cell name>
is the name of the cell where your application is installed.
Reinstall the Sample as described in the following steps:
wsadmin -conntype none -lang jython -c "AdminApp.uninstall('JaxWSServicesSamples')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('JaxWSServicesSamples')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('JaxWSServicesSamples')"
wsadmin -conntype none -lang jython -c "AdminApp.uninstall('JaxWSServicesSamples')"
wsadmin -conntype none -lang jython -c "AdminApp.install('JaxWSServicesSamples.ear', ['-appname', 'JaxWSServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>' ] )"where <node> is the name of node, and <server> is the name of server on which to install the sample.
wsadmin.sh -conntype none -lang jython -c "AdminApp.install('JaxWSServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>' ] )"where <node> is the name of node, and <server> is the name of server on which to install the sample.
wsadmin.sh -conntype none -lang jython -c "AdminApp.install('JaxWSServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>' ] )"where <node> is the name of node, and <server> is the name of server on which to install the sample.
wsadmin -conntype none -lang jython -c "AdminApp.install('JaxWSServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>' ] )"where <node> is the name of node, and <server> is the name of server on which to install the sample.
You have now rebuilt and reinstalled the JAX-WS Web services Samples application. You can configure and run the Ping, Echo and MTOM Sample clients.