Axis is a SOAP engine (and more) developed and distributed by Apache -- the same folks who brought you Tomcat. Axis is a follow on to, and replacement for, the earlier Apache SOAP project.
Axis functions as a plug into a servlet engine, such as Tomcat. That is, one simply add an Axis directory hierarchy to the Tomcat WEB-INF directory, adjusts the CLASSPATH under which Tomcat runs, and you have a SOAP engine. The Axis distribution also includes tools for mapping between Java (bean) classes and XML elements/attributes as well as a really neat TCP monitor in which one can see the SOAP messages going to and from a SOAP engine.
The discussion below supplements the regular Axis installation instructions. They are pretty clear, but I have found a few gotchas.
Install a recent version of Tomcat (e.g., 4.0.4).
I have had some problems getting it to run with 3.2.1, but have had far fewer problems with 4.0.4. You can download directly from Apache or there is a local download available.
If you wish to run Tomcat as a service, so that it will be running whenever your server machine is up, you must designate this as one of the selected options that appears as part of the installation shield. Once installed, you can configure the service through the Services subpanel that appears on the Administrative Tools control panel. The service is listed as Apache Tomcat, but you may rename it to Tomcat or some such, if you like.
I have read that converting Tomcat to a service can be done after installation using a tool called jk_nt_service.exe, but I have not been able to get this to work with 4.0.4. However, it is a simple process to make a copy of your Tomcat directories, uninstall Tomcat, reinstall with the service option selected, and then copy lib, configuration, etc., files to the newly created Tomcat directory.
Install Axis.
Again, you can download directly from Apache or there is a local download available.
If you are running another HTTP server, such as WebSphere, you may run into socket binding problems -- address already in use. One fix is to simply stop the other server before starting Tomcat.
Follow the Axis Installation Instructions for setup and test.
Step 1: also copy the docs and samples directories, as well.
Although not necessary, in experimenting with Axis I found having the samples and documentation near at hand helpful.
Step 5: do it!
Take their advice and don't proceed until you have all essential services running properly. However, the default configuration does not include several optional resources. I haven't run into problems with them missing so far.
Step 6: set the classpath.
Step 6 lists a half-dozen or so jar files that need to be added to your classpath. One jar file that is omitted from Axis that needs to be included is saaj.jar. These are all found in the axis\lib directory that was created in Step 1.
Axis is extremely sensitive with respect to classpath. For example, if you include crimson.jar, which contains some recent XML classes, Axis will break!
Organize your CLASSPATH
Windows has an upper limit on the length of environment variables (~1k) that is easy to exceed if you have a deep directory structure. Since Axis requires six or eight jar files and Java another four or so, you can run out of space for you CLASSPATH if you are running other Java-related programs, such as a IDE.
Therefore, now is a good time to get rid of the mess that most likely comprises your current classpath and actually plan (and understand) one that if more organized and more manageable. Here are some suggestions
- Create special lib directory high in your tree and put copies of your required .jar files there. For example, I have created a MyLibs directory on the same level as my MyDocuments and MySoftware directories.
- Into subdirectories (e.g., \axis or \java), I have placed copies of all of the jar files that need to be on the classpath for a given system, such as Axis, Java, or XML.
- Define new environment variables that specify the path to each directory, such as ALIB_AXIS or ALIB_JAVA. That way, if a directory moves, you can update the classpath by changing only a single variable.
- Build up, as new environment variables, specialized segments of the overall classpath, such as all the jar files for Axis (i.e. ACP_AXIS) or for Java (i.e. ACP_JAVA). Use the path symbolic variable (e.g., %ALIB_AXIS%) to define the path to each specific jar file (e.g., %ALIB_AXIS%\axis.jar);
- Finally, define your actual CLASSPATH variable as a sequence of the specialized segments, such as %ACP_AXIS%;%ACP_JAVA%;%ACP_XML%; Thus, it becomes a relatively simple matter to change the classpath or to specialize it for a particular task if the overall length of the classpath for all of the jar files exceeds the maximum. Plus, you may finally understand what is actually going on in this realm!