|
 |
 |
Compile, Publish, and Test the Web Service
Exercise
In this lab you will compile, publish and test the web service code you created in the previous labs in this section using Apache Tomcat/Axis.
Prerequisites
Objectives
- Discover how to compile, publish and test the web service.
Setup Tasks
Open the web service code generated in the previous labs (see Prerequisites), or
download the file (ZIP).
Note: Ensure the remote administrator is enabled in Apache Axis
Tasks
- Package the web service code in a jar file using the % jar cvf calc.jar calculator/ws/ command.
- Move the calc.jar file to the %TOMCAT_HOME%/webapps/axis/WEB-INF/lib folder.
- Verify that the Axis libraries are in your class path.
- Make sure the Tomcat application server is running.
- Using the Apache Axis Admin Client, deploy the web service using the following command:
% java org.apache.axis.client.AdminClient deploy.wsdd command.
- Download the file CalcClient.java
that invokes the calculator web service operations.
- Compile and run the CalcClient.java file to produce the following output:
1 + 2 = 3.0
5 – 1 = 4.0
Check Your Work
Download the completed code (JAR).
Additional Labs
Back to the Developer Lab Main Menu
|
|