Herong's Tutorial Notes on Web Service and SOAP
Dr. Herong Yang, Version 2.11

SOAP Java Implementations

Part:   1  2  

(Continued from previous part...)

Installing Axis 1.2.1 on Windows

Before installing Axis, you should look at your current JDK and Tomcat installations. Here is what I have on my system:

Name     Version   Location
JDK      1.5.0     \jdk
Tomcat   5.5       \tomcat

If you are ready, repeat the following steps to install Axis on your system.

1. Go to http://ws.apache.org/axis/releases.html, and select version 1.2.1.

2. Go to the suggested mirror site, and download axis-bin-1_2_1.tar.gz.

3. Unzip axis-bin-1_2_1.tar.gz, move the resulting subdirectory .\axis-1_2_1 to \axis.

4. Copy \axis\webapps\axis directory to \tomcat\webapps\axis.

5. Re-start Tomcat with a command window:

cd \tomcat\bin
set JAVA_HOME=\jdk
startup

You should get something like this in a separate window:

(Date) 9:47:16 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
(Date) 9:47:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 5407 ms
(Date) 9:47:17 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
(Date) 9:47:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
...

6. Run Internet Explorer (IE) with url: http://localhost:8080/axis/happyaxis.jsp. You should get something like this in the browser:

Axis Happiness Page

Examining webapp configuration

Needed Components
   Found SAAJ API ... \tomcat\webapps\axis\WEB-INF\lib\saaj.jar
   Found JAX-RPC API ... \tomcat\webapps\axis\WEB-INF\lib\jaxrpc.jar
   Found Apache-Axis ... \tomcat\webapps\axis\WEB-INF\lib\axis.jar
   Found Jakarta-Commons Discovery ... \tomcat\webapps\axis\WEB-INF
      \lib\commons-discovery-0.2.jar
   Found Jakarta-Commons Logging ... \tomcat\bin
      \commons-logging-api.jar
   Found Log4j ... \tomcat\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar
   Found IBM's WSDL4Java ... \tomcat\webapps\axis\WEB-INF
      \lib\wsdl4j-1.5.1.jar
   Found JAXP implementation ... an unknown location

   Error: could not find class javax.activation.DataHandler from 
      file activation.jar
   Axis will not work. 
   See http://java.sun.com/products/javabeans/glasgow/jaf.html

   Optional Components
   Warning: could not find class javax.mail.internet.MimeMessage 
      from file mail.jar
   Attachments will not work. 
   See http://java.sun.com/products/javamail/

   Warning: could not find class org.apache.xml.security.Init 
      from file xmlsec.jar
   XML Security is not supported. 
   See http://xml.apache.org/security/
...

Wow. This is really a nice installation report. I can ignore the two warnings. But I have to fix the error. Continue with the next section.

Installing JAF 1.0.2

JAF stands for JavaBeans Activation Framework. Here is the official description of JAF 1.0.2:

With the JavaBeans Activation Framework standard extension, developers who use Java technology can take advantage of standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and to instantiate the appropriate bean to perform said operation(s). For example, if a browser obtained a JPEG image, this framework would enable the browser to identify that stream of data as an JPEG image, and from that type, the browser could locate and instantiate an object that could manipulate, or view that image.

I need to install JAF 1.0.2 to complete my Axis installation. Here is what I did:

1. Go to http://java.sun.com/products/javabeans/glasgow/jaf.html.

2. Follow the instructions to download jaf-1_0_2-upd2.zip.

3. Unzip jaf-1_0_2-upd2.zip.

4. Copy .\jaf-1.0.2\activation.jar to \axis\webapps\axis\WEB-INF\lib

5. Re-start Tomcat, and go to http://localhost:8080/axis/happyaxis.jsp again. You should get no more error. All needed components are found:

...
Needed Components
   Found SAAJ API ... \tomcat\webapps\axis\WEB-INF\lib\saaj.jar
   Found JAX-RPC API ... \tomcat\webapps\axis\WEB-INF\lib\jaxrpc.jar
   Found Apache-Axis ... \tomcat\webapps\axis\WEB-INF\lib\axis.jar
   Found Jakarta-Commons Discovery ... \tomcat\webapps\axis\WEB-INF
      \lib\commons-discovery-0.2.jar
   Found Jakarta-Commons Logging ... \tomcat\bin
      \commons-logging-api.jar
   Found Log4j ... \tomcat\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar
   Found IBM's WSDL4Java ... \tomcat\webapps\axis\WEB-INF
      \lib\wsdl4j-1.5.1.jar
   Found JAXP implementation ... an unknown location
   Found Activation API ... \tomcat\webapps\axis\WEB-INF
      \lib\activation.jar
...

I think my Axis installation is done now.

Conclusion

Apache Axis seems to be most popular Java implementation of SOAP. Installation is easy.

Part:   1  2  

Dr. Herong Yang, updated in 2006
Herong's Tutorial Notes on Web Service and SOAP - SOAP Java Implementations