3.1 Tools and Projects Used

There are several projects and tools that are used extensively throughout the book. You should take the time to get each one set up and operating on your machine, so you can focus on writing code in the later chapters, rather than fool with configuration files.

3.1.1 Apache Jakarta Tomcat

Apache Jakarta Tomcat is a popular, free, open source application server. It serves as the reference implementation of the Java Servlet and JavaServer Pages specifications. You can download Tomcat at http://jakarta.apache.org/tomcat/.

This book was written using Tomcat 5.0.18. If you run Windows, you can download and run a standard Windows installer that will install the software. On Windows, I recommend installing the software into the C:\Tomcat5 directory instead of the default C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib directory, as certain software can have problems with spaces in the directory path. On other platforms (such as Mac OS X and Unix-based system), you should download the .tar, .gz, or .zip version.

If you see errors when attempting to compile JSP pages while running Tomcat 5.0, you may need to copy the tools.jar file (containing the javac compiler) into your Tomcat installation. If you installed the Java 1.4.2_03 with the bundled NetBeans in the default directory on Windows, you can find tools.jar file at C:\Program Files\j2sdk_nb\j2sdk1.4.2\lib\tools.jar. Copy this tools.jar file to C:\Program Files\Apache Software Foundation\Tomcat 5.0\common\lib and restart Tomcat.


Tomcat uses several directories for managing the class path; you should be familiar with the different directories when building your own web applications. For more information on where to place your classes, see http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html.

Tomcat is by no means the only Java application server suitable for web services; virtually every major technology vendor (with the exception of Microsoft) offers a Java-based application server, including Sun Microsystems, IBM, BEA, and Macromedia. There are also a variety of other open source application servers, including JBoss (http://www.jboss.org/) and Enhydra (http://www.enhydra.org/). As long as the server supports Servlet 2.3/JSP 1.2 or later, you should expect to be able to run the examples provided in this text.

3.1.2 Apache XML-RPC

In some of the examples in this book, we use Apache Axis's older, less complex brother, XML-RPC (http://www.xml-rpc.com/). You can download the Apache implementation of XML-RPC at http://ws.apache.org/xmlrpc/ (Version 1.2b-1 was used in this text). The XML-RPC distribution is shown in Figure 3-1.

Figure 3-1. Apache XML-RPC installation layout
figs/rww_0301.gif


Notice in the figure that there is just a single XML-RPC JAR file: you must add this JAR to your class path.

3.1.3 Apache Axis

Apache Axis is the latest iteration of the Apache SOAP web service toolkit, providing support for both SOAP and WSDL. You can use Axis to create your own web services or to act as a client for other web services.

You can download Axis at http://ws.apache.org/axis/. This book uses Axis 1.1, the latest stable release as of this writing. The download, axis-1_1.tar.gz or axis-1_1.zip, should be decompressed into an easily accessible, permanent location. The directories included in the Axis 1.1 distribution are shown in Figure 3-2.

Figure 3-2. Axis 1.1 installation directory
figs/rww_0302.gif


The Axis 1.1 lib directory contains several JAR files needed by Axis (in addition to the core library, axis.jar). Keep in mind that there are two main uses of Axis: first, as a set of libraries that provide services for client and server web applications, and second, as a tool to generate Java bindings from a WSDL file. Therefore, you will likely want to add the various JAR files in the Axis lib directory to your application class path, and also retain a copy for use with generating the WSDL bindings. I'll demonstrate creating and using a SOAP web service later in this chapter.

There are a variety of other toolkits available for both consuming and producing SOAP- and WSDL-based services. In particular, many commercial application servers offer proprietary toolkits. That said, Apache Axis can be dropped into most popular Java application servers and is listed as a supported toolkit by all the vendors offering SOAP web services in this book. In the event that you need to change application server vendors, it's much easier to migrate Axis-based applications to other systems than to migrate applications based on a proprietary toolkit.