This document provides information on Axis2 distribution packages, system prerequisites and setting up environment variables and tools followed by detailed instructions on installation methods.
Send your feedback to: axis-dev@ws.apache.org mailing list. (Subscription details are available on Axis2 site.) Kindly prefix every email subject with [Axis2].
Java Development Kit (JDK) | 1.4 or later (For instructions on setting up the JDK in different operating systems, visit http://java.sun.com) |
Disk | Approximately 11 MB separately for standard binary distribution |
Operating system | Tested on Windows XP, Linux, Mac OS X, Fedora core, Ubuntu, Gentoo |
Build Tool-Apache Ant To run samples and to build WAR files from Axis2 binary distribution. | Version 1.6.5 or higher (download). |
Build Tool- Apache Maven 2.x
Required only for building Axis2 from Source Distribution |
2.0.7 or higher in Maven 2.x series (download). Please download Maven 2.x version. Axis2 does not support Maven 1.x anymore. |
Make sure that the above prerequisites are available for the Axis2 installation.
This section provides you with the following information
Download and install Apache Ant (version 1.6.5 or later). Install Apache Ant according to the instructions included with the Ant release.
Locate the Ant build file (build.xml) inside the webapp directory, which resides in your Axis2 home directory (i.e:- $AXIS_HOME/webapp)". Run the Ant build by executing "ant create.war" inside the $AXIS2_HOME/webapps folder. You can find the generated axis2.war inside the $AXIS2_HOME/dist directory. All the services and modules that are present in the AXIS2_HOME/repository will be packed into the created axis2.war together with the Axis2 configuration found at $AXIS2_HOME/conf/axis2.xml.
Read Installing Axis2 in a Servlet Container to find out how to deploy the Axis2 Web application in a servlet container.
It is advised to add the $AXIS2_HOME/bin to the PATH, so that you'll be able to run the following scripts from anywhere.
Script Name | Description |
axis2.{bat|sh} | You can use this script to run web service clients written
using Axis2. This script calls the "java" command after adding the
classpath for Axis2 dependent libraries (*.jar files present in
your AXIS2_HOME/lib), setting the Axis2 repository location
(AXIS2_HOME/repository) and setting the Axis2 configuration file
location(AXIS2_HOME/conf/axis2.xml) for you. With this you can be
relieved from setting all the above Axis2 specific
parameters. Usage : axis2.{sh.bat} [-options] class [args...] |
axis2server.{sh|bat} | This script will start a standalone Axis2 server using the
AXIS2_HOME/repository as the Axis2 repository and the
AXIS2_HOME/conf/axis2.xml as the Axis2 configuration file. This
will start all the transport listeners listed in the
AXIS2_HOME/conf/axis2.xml.
For example, if you want to deploy a service using a standalone Axis2 server,then copy your service archive to the AXIS2_HOME/repository/services directory. Next, go to the "Transport Ins" section of the AXIS2_HOME/conf/axis2.xml and configure the transport receivers (simpleHttpServer in port 8080 is listed by default). Then invoke this script. |
wsdl2java.{bat|sh} | This script generates Java code according to a given WSDL file
to handle Web service invocations (client-side stubs). This script
also has the ability to generate web service skeletons according to
the given WSDL. Usage: wsdl2java.{sh|bat} [OPTION]... -uri <Location of WSDL> e.g., wsdl2java.sh -uri ../wsdl/Axis2Sample.wsdl A more detailed reference about this script can be found here |
java2wsdl.{bat|sh} | This script generates the appropriate WSDL file for a given
Java class. Usage: Java2WSDL.{sh|bat} [OPTION]... -cn <fully qualified class name> e.g., Java2WSDL.sh -cn ../samples/test/searchTool.Search A more detailed reference about this script can be found here |
Whichever the distribution, installing Axis2 in a J2EE compliant servlet container is as follows:
The uploaded .aar files will be stored in the default service directory. For Axis2, this will be the <webapps>/axis2/WEB-INF/services directory. Once a service is uploaded, it will be installed instantly.
Since Axis2 supports hot deployment, you can drop the service archive directly through the file system to the above mentioned services directory. It will also cause the service to be automatically installed without the container being restarted.
Use the 'Services' link on the Web Application home page to check the successful installation of a service. The services and the operations of successfully installed services will be displayed on the available services page.
If the service has deployment time errors it will list those services as faulty services. If you click on the link, you will see the deployment fault error messages.
Deployment time error message
Axis2 Administration is all about configuring Axis2 at the run time and the configuration will be transient. More descriptions are available in the Axis2 Web Administration Guide
Required jar files do not come with the distribution and they will also have to be built by running the maven command. Before we go any further, it is necessary to install Maven2 and set up its environment, as explained below.
The Axis2 build is based on Maven2 . Hence the only prerequisite to build Axis2 from the source distribution is to have Maven installed. Extensive instruction guides are available at the Maven site. This guide however contains the easiest path for quick environment setting. Advanced users who wish to know more about Maven can visit this site.
mvn install
command will build the Axis2 jar file.
Once the command completes, the binaries (jar files in this
case) can be found at a newly created "target" directory.
Note: For the first Maven build (if the maven repository is not built first) it will take a while since the required jars need to be downloaded. However, this is a once only process and will not affect any successive builds.
The default maven build will generate the war under modules/webapp/target directory