JAX-RPC Web services |
|
![]() |
Build with Ant | JAX-RPC Web services Samples |
Getting started |
Identifying the directory structure of the Samples build |
Rebuilding and reinstalling the WebServicesSamples.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 UNIX systems, 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 (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 you see
the same gallery. The one exception is
that when you click sample_name > Build with Ant > platform > Rebuilding and installing the sample.ear file, you get instructions to
rebuild the EAR file on that platform. Because text files in an
EAR file (XML, xmi, JavaServer Pages (JSP) files, and so on) 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 Application Server Sample applications as well.
Make a backup copy of the <profile_root>/samples/src/WebServicesSamples directory before attempting to modify or rebuild the Samples.
The Samples are installed in the following directories:
<profile_root>/samples/src/WebServicesSamples | Contains the Sample source code for the AddressBook and Stock Quote Samples. |
<profile_root>/samples/lib/WebServicesSamples | Contains the Web archive (WAR) files, the Java archive (JAR) files, and the final WebServicesSamples.ear file for Samples. This directory is created after the sample is rebuilt. |
<profile_root>/samples/javadoc/WebServicesSamples | Contains the Samples Javadoc documentation. This directory is created after the sample is rebuilt. |
<profile_root>/samples/bld/WebServicesSamples | Contains the generated class files. These class files are used to generate the final WebServicesSamples.ear file. This directory is created after this sample is rebuilt. |
The JAX-RPC 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.
Executing the Samples build script |
Removing and reinstalling the WebServicesSamples.ear file |
To rebuild this Sample, verify that <profile_root>/bin is in your PATH environment variable. Follow these steps to execute the Sample build script, which rebuilds the Sample:
The Sample is now built.
The buildWebServicesSamples.bat and the buildWebServicesSamples.sh script in the <profile_root>/samples/bin/WebServicesSamples directory sets the appropriate class path information and executes the Ant build utility. Ant reads the build.xml files, which describe how to build the Sample. Refer to the Jakarta Web site for additional documentation on Ant.
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-RPC 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('WebServicesSamples')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('WebServicesSamples')"
wsadmin.sh -conntype none -lang jython -c "AdminApp.uninstall('WebServicesSamples')"
wsadmin -conntype none -lang jython -c "AdminApp.uninstall('WebServicesSamples')"
wsadmin -conntype none -lang jython -c "AdminApp.install('WebServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb' ] )"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('WebServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb' ] )"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('WebServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb' ] )"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('WebServicesSamples.ear', ['-appname', 'WebServicesSamples', '-usedefaultbindings', '-node', '<node>', '-server', '<server>', '-deployejb' ] )"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-RPC Web Services Samples application. You can Configure and run the Address Book and Stock Quote sample clients.