Apache Axis

Apache Axis is an open source, XML-based Web service framework. It consists of a Java and a C++ implementation of the SOAP server, and various utilities and APIs for generating and deploying Web service applications. Using Apache Axis, developers can create interoperable, distributed computing applications. Axis is developed under the auspices of the Apache Software Foundation.

Integration of Apache Axis with ArcGIS Server 9.3.1
The most important feature in ArcGIS 9.3.1 that has a migration impact is the new ArcGIS Java WebServices toolkit. A vast majority of ArcGIS Server’s clients use Web services to consume the server’s capabilities. Among these clients, the WebADF and Representational State Transfer (REST) serve as the foundation for building applications that bring ArcGIS to the Web.

Having an optimized Simple Object Access Protocol (SOAP) stack in these clients is paramount for performance. Until ArcGIS 9.3, Java clients used Apache’s Web services toolkit called Axis as the SOAP stack. When ESRI adopted Axis, it was the most robust toolkit available.

Things have changed considerably in the recent past with Sun putting its weight behind a new Web services toolkit standard known as JAX-WS (Java application programming interface [API] for Extensible Markup Language [XML] Web Services). However JAX-WS could not fit into the JavaADF model efficiently. Initial load time and memory size does not fit with the WebADF or REST model. Each Stub object takes about 6MB and load time is around 4.5 seconds per user. JAX-WS runtime libraries were too large (for example, webservices-rt.jar was about 12MB). Also, Web application server related issues prevented the use of the JAX-WS stack.

Axis for Java
When using the Java version of Axis there are two ways to expose Java code as webservice. The easiest one is to use Axis native JWS (Java Web Service) files. Another way is to use custom deployment. Custom deployment enables you to customize resources that should be exposed as webservice.

See also Apache Axis2.

JWS Webservice creation
JWS files contain Java class source code that should be exposed as webservice. The main difference between an ordinary java file and jws file is the file extension. Another difference is that jws files are deployed as Source code and not compiled class files.

The following example is taken from http://ws.apache.org/axis/java/user-guide.html#PublishingWebServicesWithAxis. It will expose methods add and subtract of class Calculator.

JWS webservice deployment
Once the Axis servlet is deployed, you need only to copy the jws file to the Axis directory on the server. This will work if you are using a Apache Tomcat container. In the case that you are using another web container, custom WAR archive creation will be required.

JWS webservice access
JWS webservice is accessible using the URL "http://localhost:8080/axis/Calculator.jws". If you are running a custom configuration of Apache Tomcat or a different container, the URL might be different.

Custom deployed webservice
Custom webservice deployment requires a specific deployment descriptor called WSDD (Web Service Deployment Descriptor) syntax. It can be used to specify resources that should be exposed as webservices. Current version (1.3) supports


 * RPC services
 * EJB - stateless (Enterprise Java Bean)

Automated generation of WSDL
When a Webservice is exposed using Axis it will generate a WSDL file automatically when accessing the webservice URL with ?WSDL appended to it.

Axis for C++
An example for implementing and deploying a simple web-service with the C++ version of Axis can be found in the Axis-CPP Tutorial (link in the Reference section below).

The steps necessary are:


 * Create the wsdl file
 * Generate client and server stubs using wsdl2ws
 * Provide the server side web service implementation (e.g. the add method of the calculator service)
 * Build the server side code and update the generated deploy.wsdd with the .dll path
 * Deploy the binaries to the directory specified in the wsdd
 * Build client
 * Run and enjoy...

For more information on the individual steps go directly to the tutorial.

Related technologies

 * Apache Axis2 - re-design/write of Axis
 * Java Web Services Development Pack - web services framework
 * Apache CXF - other Apache web services framework (old XFire &amp; Celtix)
 * XML Interface for Network Services - RPC/web services framework
 * Web Services Invocation Framework - Java API for invoking Web services
 * webMethods Glue - commercial web services enabling product
 * AlchemySOAP - open source C++ web services framework