Apache AXIS client for InteropHelloWorld application |
Apache AXIS client for InteropHelloWorld application
This document describes how to compile and execute an Apache AXIS Java client with InteropHelloWorld webservice described here.This document contains the following sections:
- Overview
- Compiling and Assembling the AXIS client
- Troubleshooting
Overview
AXIS is Apache's SOAP implementation. For more information on AXIS, go here. The client described in this document was written using 1.1 Final version of AXIS (Java). Before proceeding with compiling and running the AXIS client, you'll need to download the Final 1.1 version of AXIS. We got it from here. You do not need to install AXIS to run this client, but you will need the following libraries: axis.jar , commons-discovery.jar and commons-logging.jar to be able to run the client. After you download the AXIS 1.1 binaries, unpack the contents of that package. You'll find the above mentioned jar files in the lib directory. Create a lib directory under <install_dir>/samples/webservices/interop and copy the above mentioned jar files into the directory you just created.
Compiling and Assembling the AXIS client
To recompile and assemble the client, see the Sample Application Build Facility document for details on using a build facility to quickly perform these tasks. butFor example, to rebuild the entire application from scratch, perform the following steps:
- Compile and Assemble the J2EE Application.
- Execute the asant command under <install_dir>/samples/webservices/interop/apps/axis-client/
- The default target core is executed to rebuild the axisClient.jar file.
- Deploy the application.
- After you have re-created the sample application from scratch, proceed to Running the AXIS client.
- Clean the application project area.
- Execute the asant clean command to clean the application area.
Running the Sample Application
Perform the following steps to run the sample application:
- >cd <install_dir>/samples/webservices/apps/axis-client
- Execute asant run to execute the client
- The client sends the following string to the InteropHelloWorld webservice: "AXIS". The webservice returns the following message to the client:
"You're talking to a Sun Web Service using <string received from the client> client." So in the case of an Apache AXIS the client output on the console will be:
run:
[echo] Running axis client ./build/assemble/jar/axisClient.jar
[java] You're talking to a Sun Web Service using AXIS client.
Troubleshooting
If you see errors while executing asant core, check if axis.jar, commons-discovery.jar and commons-logging.jar are present in <install_dir>/samples/webservices/interop/lib directory. See the Overview section above on how to get these jars. After placing the jars in the above mentioned directory, run asant core again to package the client.
If you see errors while executing the client (asant run), check if axis.jar , commons-discovery.jar and commons-logging.jar are present in <install_dir>/samples/webservices/interop/lib directory. See the Overview section above on how to get these jars. After placing the jars in the above mentioned directory, run asant run again to package the client.
Copyright © 2004-2005 Sun Microsystems, Inc. All rights reserved.
Last Updated June11,
2004