Axis2 Development Environment

For the SOAP assignments in this course you will use a preconfigured development environment. This environment consists of a package including Apache Axis2, which has been bundled with Apache Ant and Apache TCPMon. As these technologies are platform-independent, it is possible to use this development environment on any platform that supports Java, this has only been tested on Linux, Mac OS/X (1.4 and later), and Windows (XP and later) however. Scripts for setting environment variables are only provided for the bash shell.

Installing the environment

The development environment is available as a zip-file in the course downloads directory. Download the development environment and unpack it at a location of your choosing on the computer you wish to use for the assignments. When using the CS computers for the assignments, you are recommended to use the path ~/edu/5dv095/env/ for the development environment. Please note that the package contains a default configuration file mapping the web server run by the SOAP engine to port 8080. To resolve port conflicts when multiple instances of the package are used on the same computer, update the Axis2 configuration file (search and replace 8080 with the port you would like to use).

When unpacking the zip-file a directory structure containing a folder named axis2_5dv095 is created. This is the root folder for your development environment and contains (among others) the following files:

axis2_5dv095/                                            <- development environment root folder
             apache-ant-1.7.1/                           <- Apache Ant (do not modify)
             axis2-1.5/                                  <- Apache Axis2
                         bin/                            <- Apache Axis2 binaries directory
                             axis2server{.sh | .bat}     <- Apache Axis2 start script
                         conf/                           <- Apache Axis2 configuration directory
                              axis2.xml                  <- Apache Axis2 configuration file
                         repository/                     <- Apache Axis2 code repository
                                    services/            <- Apache Axis2 Web Service repository (deploy services here)
             env.sh                                      <- environment variable setup script (source this in each shell)
             tcpmon-1.0-bin                              <- Apache TCPMon

Using the environment for web service development

The Apache Axis2 SOAP engine has in this package been bundled to run as using a standalone web server, which can be controlled through the Axis2 start script. Console logging is by default routed to stdout in the server shell. Apache Ant has been included in the package to facilitate use of the package on student machines.

Installing Java

A functional installation of Java (version 1.6 or later) is required to use the development environment. If installing Java on your Windows PC, use Suns Java JDK v1.6.16 (32-bit or 64-bit) This is (as of end of August 2009) the latest stable release of Suns JDK. Keep the default install path for Java: C:\Program Files\Java\jdk1.6.0_16\ and use all other default values in the installation process as well.

Setting Environment Variables

The ANT_HOME and AXIS2_HOME environment variables allows the system to locate where these packages have been installed. ANT_HOME is required to build services using ant, and AXIS2_HOME to run the Axis2 SOAP engine. Setting these environment variables can be done using the command source env.sh when using bash on the CS computers.

The JAVA_HOME environment variable allows Axis2 to locate and determine which version of Java to use. The following are common default locations for the Java environment (suitable values for JAVA_HOME).

UNIX/Linux
/pkg/java
Windows (all versions)
C:\Program Files\Java\jdk1.6.0_16
MacOS X (version 1.5 with Java 1.6 update)
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
For earlier versions of MacOS X (or MacOS X 1.5 without the Java 1.6 update), contact a teacher for details on how to build a custom package). If you have a different version of Java, or have installed Java in a custom location, you will have to update the JAVA_HOME portion in service scripts. It is possible to set this to use other versions of Java as well, but note that the current version of Axis2 requires a Java version of 1.5 or higher.

Using the environment on CS computers

If you use the environment on the CS computers you will not need to install or configure Java (as it is already installed).

Manually changing the Axis2 port

You can alter the Axis2 configuration file and specify another port manually. Simply search and replace 8080 by the port number you wish to use in the Axis2 configuration file (axis2-1.5/conf/axis2.xml). Note that you need to select a port numbers higher than 1023 on UNIX (and mac) systems (as they are reserved for the root user).

HELP!!!

Having problems installing or using the environment? Contact one of the teachers!