Getting the Apache SOAP working
1. Download and install tomcat 4.0.1 from http://www.apache.org.
2. Download and install SOAP 2.2 from http://xml.apache.org.
3. Setting up tomcat.
set JAVA_HOME to c:\jdk1.3.1_01 (or equivalent on your system).
Add the following to path C:\jakarta-tomcat-4.0.1\bin;C:\jdk1.3.1_01\bin
4. Edit catalina.bat and make the following change at line number 75:
set CLASSPATH=%CP%
modify the above line to
set CLASSPATH=%CLASSPATH%;%CP%
5. Setting up SOAP
We need to tell tomcat to forward SOAP based requests to
the SOAP middleware.
Edit the C:\jakarta-tomcat-4.0.1\conf\server.xml
to add the following to the document
right below
<!-- Tomcat Manager Context -->
(add the following line):
<Context path="/soap" docBase="C:\soap-2_2\webapps\soap" debug="0" reloadable="true"/>
6. Download javamail from http://java.sun.com/products/javamail and JavaBeans Activation from http://java.sun.com/products/beans/glasgow/jaf.html. Extract the mail.jar and activation.jar from these two products and copy these two jar files to the C:\soap-2_2\lib directory.
7. Setup the environment variable CLASSPATH to the following:
C:\xerces-1_4_4\xerces.jar;C:\soap-2_2\lib\soap.jar;C:\soap-2_2\lib\mail.jar;C:\soap-2_2\lib\activation.jar;C:\soap-2_2; C:\jakarta-tomcat-4.0.1\common\lib\servlet.jar;.
(Make sure it does not contain any thing else, at least to get these things working well).
The C:\soap-2_2 is needed to run the samples.
8. Click on start button, run and type cmd. Type the following
cd C:\jakarta-tomcat-4.0.1\bin
startup
9. At this point, the classpath should be displayed on the command window and a new window will startup. Make sure the first thing in the classpath displayed is the xerces.jar.
10. Now run the compile.bat under the converter directory. (Make sure the –d option in the compile option in this file refers to the correct directory of SOAP on your system).
11. Deploy the application now by entering the following fields:
Visit http://localhost:8080/soap/admin
Click on Deploy and enter the value for the following fields, leaving the rest as defaults:
ID=urn:temperatureConverter
Scope=Application
Methods=c2f f2c
Provider Type=java
Provider
Class=com.durasoft.Converter
Static=No
12. Click on deploy button to deploy the application. Verify it is deployed by clicking on List.
13. Run the runClient to test the soap server.
14. Now, open a browser and type http://localhost:8080/soap/servlet/rpcrouter to see the response you get.
15. Open the fireSOAP.html in browser and click on invoke SOAP button to see the response.
16. Copy the callSOAP.jsp to the C:\jakarta-tomcat-4.0.1\webapps\ROOT directory and visit http://localhost:8080/callSOAP.jsp.