WebReference.com - Part 1 of chapter 3 from Professional Java Web Services, Wrox Press Ltd. (2/3) | WebReference

WebReference.com - Part 1 of chapter 3 from Professional Java Web Services, Wrox Press Ltd. (2/3)

To page 1current pageTo page 3
[previous] [next]

Professional Java Web Services

Installing Apache SOAP

As mentioned before, Apache SOAP is an open source Java implementation of the SOAP 1.1 and SOAP with Attachments Specifications. It contains a client-side API for accessing SOAP services and facilities for implementing SOAP services. In order to implement SOAP services Apache SOAP has to be hosted within a servlet container such as Jakarta Tomcat (usually referred to as just Tomcat). Tomcat is an open source servlet engine that serves as the official Reference Implementation of the Java Servlet and Java Server Pages technologies. More information about Jakarta Tomcat can be found at https://jakarta.apache.org/tomcat/.

In order to install and configure Apache SOAP we need to do the following:

Download and Unpack Tomcat 3.2.x

We can obtain a Tomcat 3.2.x from https://jakarta.apache.org/tomcat. After downloading, we need to unpack the distribution into a directory. If we unpack the files into C:\jakarta-tomcat-3.2.x we can then set the system variable TOMCAT_HOME, to this:

SET TOMCAT_HOME=C:\jakarta-tomcat-3.2.x

We will refer to TOMCAT_HOME for the rest of this chapter.

Download and Unpack Apache SOAP Library

Next, we can need to obtain Apache SOAP, which is available from https://xml.apache.org/soap. After downloading, we need to unpack the distribution into a directory. If we unpack the files into C:\soap-2_2 we can then set the system variable SOAP_HOME to this as follows:

SET SOAP_HOME=C:\soap-2_2

We will refer to SOAP_HOME for the rest of this chapter.

Configure Tomcat for Apache SOAP

The Apache SOAP library must be made available from within Tomcat in order to develop Apache SOAP services or web-based Apache SOAP clients, or use the web based administration tool that's provided. In order to do this we must do the following:

The soap.jar file contains classes that implement the client-side API for developing SOAP clients and classes that allow services to be implemented. We will refer to the later as the Apache SOAP run-time environment. The soap.war file contains the Apache SOAP web-based administration tool that allows us to administer. When Tomcat is started the soap.war file will be extracted into a directory called soap in the %TOMCAT_HOME%\webapps\ directory.

Setup up the CLASSPATH

In order to develop Apache SOAP clients, execute Apache SOAP clients, and utilize tools that come with Apache SOAP from outside Tomcat (that is, console or GUI-based Java applications) we have to augment the CLASSPATH environmental variable to contain the following:

Assuming that you installed Tomcat and Apache SOAP in the directories that we specified above your CLASSPATH variable should contain the following values:

C:\soap-2_2\lib\soap.jar;C:\jakarta-tomcat-3.2.3\lib\xerces.jar;
C:\jakarta-tomcat-3.2.3\lib\mail.jar;
C:\jakarta-tomcat-3.2.3\lib\activation.jar

To page 1current pageTo page 3
[previous] [next]

Created: May 15, 2002
Revised: May 15, 2002


URL: https://webreference.com/programming/java/webservices/chap3/1/2.html