Apache Axis

From Bauman National Library
This page was last modified on 14 June 2016, at 17:29.
Apache Axis
Apache Axis Logo
Developer(s) Apache Software Foundation
Stable release
Repository {{#property:P1324}}
Written in Java and C++
Operating system Cross-platform
Type Web service
License Apache License 2.0
Website http://ws.apache.org/axis

Apache Axis (Apache eXtensible Interaction System) - an open-source, XML based Web service framework for constructing SOAP processors such as clients, servers, gateways, etc. It consists of a Java and a C++ implementation of the SOAP ("Simple Object Access Protocol") submission to W3C. It also includes various utilities and APIs for generating and deploying Web service applications. Using Apache Axis, developers can create interoperable, distributed computing applications.


Axis is the third generation of Apache SOAP (which began at IBM as "SOAP4J"). In late 2000, the committers of Apache SOAP v2 began discussing how to make the engine much more flexible, configurable, and able to handle both SOAP and the upcoming XML Protocol specification from the W3C.

After a little while, it became clear that a ground-up rearchitecture was required. Several of the v2 committers proposed very similar designs, all based around configurable "chains" of message "handlers" which would implement small bits of functionality in a very flexible and composable manner.

Axis' Key Features

Usage of SAX (event-based) parsing allows to acheive significantly greater speed than earlier versions of Apache SOAP.

The Axis architecture gives the developer complete freedom to insert extensions into the engine for custom header processing, system management, or anything else. Axis defines a set of published interfaces which change relatively slowly compared to the rest of Axis. Reusable networks of Handlers can be easily defined to implement common patterns of processing for your applications, or to distribute to partners. There is a clean and simple abstraction for designing transports (i.e., senders and listeners for SOAP over various protocols such as SMTP, FTP, message-oriented middleware, etc), and the core of the engine is completely transport-independent.

Axis supports the Web Service Description Language, version 1.1, which allows to easily build stubs to access remote services, and also to automatically export machine-readable descriptions of deployed services from Axis.

Axis (Java)

When using Axis for Java there are two ways to expose Java code as Web service. 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 Web services.

See also Apache Axis2.

JWS creation

JWS (Java Web Service) files contain Java class source code that should be exposed as Web service. 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://axis.apache.org/axis/java/user-guide.html#Publishing_Web_Services_with_Axis . It will expose methods add and subtract of class Calculator.

 public class Calculator 
   public int add(int i1, int i2) 
     return i1 + i2; 
   public int subtract(int i1, int i2) 
     return i1 - i2;

JWS Web service deployment

JWS web services are intended for simple web services. You cannot use packages in the pages, and as the code is compiled at run time you can not find out about errors until after deployment. Production quality web services should use Java classes with custom 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 an Apache Tomcat container. In the case that you are using another web container, custom WAR archive creation will be required .

JWS Web service access

JWS Web service 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 Web service

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

Automated generation of WSDL

When a Web service is exposed using Axis it will generate a WSDL file automatically when accessing the Web service URL with ?WSDL appended to it.

Axis for C++

Axis C/C++ (Axis CPP) is a non-Java implementation of Axis. At its core Axis CPP has a C++ runtime engine. The provided tooling allows you to create C++ client-side stubs and server-side skeletons. The server skeletons can be deployed to either a full Apache web server using the supplied apache module or a "simple_axis_server" - which is a simple HTTP listener (designed to help you test your services).

There is also limited support for C wrappers around the generated Server and client objects. However, at the current time it is not recommended that these be used in a production environment.

The implementation has concentrated on being ws-i profile compliant. The implementation does not have support for ws-* specifications and it is envisaged that this will be provided by Axis2. However, at the current time, Axis CPP is still being actively developed and improved until such times as Axis2 C implementation has progressed far enough to take over its role.


  • Soap engine with both client and server support
  • WSDD based deployment with dynamic deployment tools.
  • Support for all basic types, Complex types and Arrays
  • WSDL2WS tool for building C/C++ components
  • Server side - Skeletons and Wrappers
  • Client side - Stubs
  • Standalone server (with HTTP support)
  • Web server modules for Apache 1.3 & Apache2 (Linux/Windows)
  • Web interface to the deployed services and their WSDL s.
  • Sample web services and client applications.

Related technologies

See also


External links