NOTE: These instructions apply to Tomcat 3.1. There are separate instructions for Tomcat 3.2, Tomcat 3.3, and Tomcat 4.0 and 4.1.

Apache-SOAP Version 2.3: Installing the Server-Side Under Apache Tomcat v3.1

IMPORTANT: Tomcat comes with an XML parser (lib/xml.jar) which has the DOM level 1 interfaces. Even if you put Xerces 1.1.2's xerces.jar in your classpath, the wrong interfaces are found by any Java code running in Tomcat because the shell script / batch file that runs Tomcat puts the user's classpath at the end. So, you must edit tomcat.sh or tomcat.bin in the bin/ directory and put xerces.jar at the BEGINNING of the classpath the script builds.

If you run startup.bat, then line 38 of tomcat.bat should look like this:

set CLASSPATH=path-to-xerces\xerces.jar;%CLASSPATH%;%cp%

If you run startup.sh, add the following after line 111:

CLASSPATH=path-to-xerces/xerces.jar:${CLASSPATH}

The easiest way to set up for Tomcat is to add a <Context> to conf/server.xml:

<Context path="/soap" docBase="path-to-apache-soap/webapps/soap"
         debug="1" reloadable="true">
</Context>

Now, make sure you have the jar files from the lib directory of this distribution on your classpath and startup tomcat. Also you will want to have on the classpath any of your code that you want to deploy as services.

You should be able to deploy services by pointing a browser to

http://hostname:port/soap

where hostname is the host on which Tomcat is running and port is the port. See the User's Guide for details on the aministration tool. The SOAP end-point for invoking services on this server is:

http://hostname:port/soap/servlet/rpcrouter

Happy SOAP-ing!