This chapter describes:
- Java Implementations of SOAP.
- Axis Installation Requirements on Windows.
- Installing Axis 1.2.1 on Windows.
- Installing JAF 1.0.2.
Java Implementations of SOAP
If you search the Web with the key words "Java Implementation of SOAP", you will find the following most popular implementations:
- Apache Web Services - Axis at http://ws.apache.org/axis/. Current release: June 15, 2005 - Version 1.2.1. Supports SOAP 1.1/1.2 specifications. This is really a continuation of Apache WebService Project.
- Apache WebService Project - SOAP at http://ws.apache.org/soap/index.html. Current release: June 10, 2002 - Version 2.3.1. Supports most of the SOAP 1.1 specification.
Feature list of current release of Apache Web Services - Axis:
- SOAP 1.1/1.2 compliant engine
- Flexible configuration / deployment system
- Support for "drop-in" deployment of SOAP services (JWS)
- Support for all basic types, and a type mapping system for defining new serializers/deserializers
- Automatic serialization/deserialization of Java Beans, including customizable mapping of fields to XML elements/attributes
- Automatic two-way conversions between Java Collections and SOAP Arrays
- Providers for RPC and message based SOAP services
- Automatic WSDL generation from deployed services
- WSDL2Java tool for building Java proxies and skeletons from WSDL documents
- Java2WSDL tool for building WSDL from Java classes.
- Preliminary security extensions, which can integrate with Servlet 2.2 security/roles
- Support for session-oriented services, via HTTP cookies or transport-independent SOAP headers
- Preliminary support for the SOAP with Attachments specification
- An EJB provider for accessing EJB's as Web Services
- HTTP servlet-based transport
- JMS based transport
- Standalone version of the server (with HTTP support)
Feature list of last release of Apache WebService Project - SOAP:
- Supports most of the SOAP v1.1 specification.
- Supports the SOAP Messages with Attachments W3C Note.
- Provides server-side infrastructure for deploying, managing and running SOAP enabled services.
- Provides client-side API for invoking SOAP services.
- Release includes full source under the Apache Software License.
- Supports three encoding styles: SOAP v1.1 Encoding, Literal XML and XMI.
- XMI encoding (available when using Java 1.2.2) supports automatic marshalling and unmarshalling of arbitrary objects.
- SOAP encoding: built-in support is provided for encoding/decoding primitive types, Strings, arbitrary JavaBeans (using reflection) and 1-dimensional arrays of these types. For other types user can hand-write encoder/decoder and register with XML-SOAP runtime.
- Literal XML encoding: allows one to send XML elements (DOM org.w3c.dom.Element objects) as parameters by embedding the literal XML serialization of the DOM tree. No code needs to be written to support this (see the addressbook demo to see a sample use of it).
- Supports messaging and RPC over two transports: HTTP and SMTP.
- Supports authoring services in scripting languages.
Axis Installation Requirements on Windows
There is no clear document tells what are the requirements to install Axis on Windows systems. But I guess that JDK 1.4 and Tomcat 4.x should be enough.
On my system, I have JDK 1.5.0 and Tomcat 5.5 installed. That should be good enough to try Axis myself.
To learn more about installing JDK, read my other book: "Herong's Tutorial Notes on JDK".
To learn more about installing Tomcat, read my other book: "Herong's Tutorial Notes on JSP".
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.
discuss this topic to forum
