If you have TomCat and Apache SOAP, you can still deploy and run this example. However, the Apache SOAP package does not contain all the necessary .jar files, and it also does not mention some the files that you must have in order to deploy a Web service. Refer to Library Files to see a complete list of jar files that you need to run a Web service on TomCat.
Go to the bin directory of your TomCat installation directory.
Run the typical batch file to setup the environment variables.
Start the TomCat server by entering the command
startup
There are two ways to deploy a Web Service on TomCat: using the Apache SOAP admin tool, or manual deployment.
Open a Web browser and enter the URL http://hostname:port/soap/admin
Note Replace the hostname and port with appropriate hostname and and port. (For example, localhost:8080)
Click Deploy.
Enter urn:ExcelCalculatorWebService as the ID.
Select Application as the Scope.
Enter plus minus times divide as the Methods.
Enter samples.excelwebservice.ExcelCalculatorWebService as the Provider Class.
Scroll down and click Deploy at the bottom of the form.
In order to deploy a Web service manually, you need a deployment descriptor filean XML file that describes the Web service.
Create the file DeploymentDescriptor.xml by cutting and pasting the following text from your Web browser. This file is included in your jintegra/examples/SOAP-COM directory when you download J-Integra®.
Here is the file.
<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" id="urn:ExcelCalculator"> <isd:provider type="java" scope="Application" methods="plus minus times divide"> <isd:java class="samples.excel.ExcelExample" static="false"/> </isd:provider> <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener> </isd:service> |
Copy DeploymentDescriptor.xml into the D:\Pure directory.
Open a DOS session and go to D:\Pure.
Run the typical batch file to set the environment variables.
Enter the following command to deploy the Excel Calculator Web Service:
java org.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy DeploymentDescriptor.xml