Home > SOA Tips > The Web Services Advisor > The Axis2 Web services toolkit
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

THE WEB SERVICES ADVISOR

The Axis2 Web services toolkit


William Brogden
09.05.2007
Rating: -4.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


The history of Apache Software Foundation Web service toolkits mirrors the evolution in developer understanding of SOAP and Web services concepts. The first Apache Software Foundation open source Web service related project was simply called SOAP. It was released in mid 2000 based primarily on code from IBM's SOAP4J project. At that time, most people were thinking of Web services as a kind of remote procedure call (RPC) using HTTP for transport and XML for encoding. This approach has gradually been replaced by thinking of Web services in terms of moving XML-formatted documents using the SOAP protocols.

As it became obvious that SOAP and Web services were going to become a big deal in computing, the project structure at the Apache Software Foundation mutated. Most Web services related open source projects are now based on the "Apache Web Services Project."

The first Apache SOAP toolkit parsed the entire request or response XML message into a document object model (DOM) in memory before further processing. This approach was conceptually simple, but could not handle large messages well because the toolkit always builds a complete DOM before turning processing over to application code. When it became clear that the DOM approach had serious limitations, a new ASF project called Axis was started.

Version 1.0 of Axis 1 was released in late 2002. It used SAX parsing for speed and memory use improvement over DOM parsing. It provided direct support for WSDL and worked well with the Java standard library XML APIs. SAX is a "push" style parser, which has the disadvantage that there is no convenient way to stop the parser in a way that facilitates passing the XML document on to the next stage of processing. The latest release, version 1.4, released in 2006, is still extensively used for Web services because many developers have felt that Axis2 is not fully developed.

Axis2 is a complete redesign of the toolkit based on the lessons learned from Axis 1. Initial versions of Axis2 have been public since early 2005, but major revisions continued to be made. Version 1.3, released Aug 13 2007, is probably stable enough to be useful to developers. In addition to supporting the most recent standards, the architecture is designed to support easy addition of plug-in "modules" to keep up with rapidly evolving WS-* standards. Axis2 uses a new XML programming model called AXIOM (Axis Object Model).

Why Axis2 uses AXIOM

AXIOM is a completely different approach to efficient handling of SOAP messages. It is considered one of the major innovations introduced in Axis2. The problems AXIOM tries to solve have been introduced by the proliferation of additions to the original SOAP concept of XML-formatted messages flowing between a client and a service. These additions mean that a SOAP-formatted message may be passed through many processes before reaching a final destination. Many of these processes only need to look at certain elements of the message so completely parsing the message at each step would be very wasteful.

The AXIOM approach attempts to provide a way for each stage of processing to only parse what it needs and efficiently pass the message to the next stage. Basic document parsing uses the "pull-parsing" model which provides a convenient way to stop parsing a document as soon as you have found what you were looking for while preserving the entire document. The particular pull parser used is called StAX (Streaming API for XML). A StAX parser implementation is part of the Java standard library since version 1.6.

The AXIOM approach also supports XML-binary Optimized Packaging (XOP) and SOAP Message Transmission Optimization Mechanism (MTOM). These extensions to SOAP attachments attempt to overcome the basic inefficiency of representing extensive amounts of binary data in XML documents.

Axis Toolkits and Standards

Axis 1 and Axis2 support many commonly used Web service standards and toolkits. I only have room to quickly summarize these as follows:

SOAP: The SOAP standard defines the XML elements which enclose the application specific data and outlines the basics of processing a SOAP message. Both Axis toolkits support the current SOAP 1.2 specification.

WSDL: Both Axis toolkits support automatic creation of Java client and server classes from a WSDL version 1.1 document and the reverse creation of WSDL to match an existing Java class.

POJO: The delightful acronym for a Plain Old Java Object offers a simple way to get a web service running quickly. Provided your Java object meets certain design criteria for method naming, AXIS 2 provides a simplified method for turning it into a web service.

REST: Representational State Transfer is a simplified alternative to SOAP for Web services currently getting a lot of developer interest. The Axis2 server side and client side libraries can be configured to enable processing of a REST-style request by a SOAP service.

WS-Policy: WS-Policy documents provide a syntax for expressing Web service features and requirements in a more general fashion than is provided by WSDL or UDDI descriptions and is related to many of the new WS-* specifications. Axis2 supports many features of the current WS-Policy 1.5 recommendation.

The Future of Axis2

It is by no means clear that the Axis 2 toolkit will become the approach of choice for Web service developers. At the present state of development, the AXIOM document model is not achieving the hoped for speed and memory efficiency. There are many toolkits for SOAP, both open-source and commercial, competing for developer attention.

Resources

The starting page for the Apache Web Services Project.

A detailed discussion of the advantages of AXIOM.

A short explanation of the REST approach to Web services.


Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
The Web Services Advisor
Web services for Windows CE
Testing Web services and RIAs
The problem with IT project management
Web services with Open and Microsoft Office
REST with Axis, Struts, ColdFusion and WCF
Cross-site XMLHttpRequest: Boon or Pandora's Box
SOA and Web 2.0: The odd couple?
Project Zero, a RESTful new beginning for IBM
Swordfish: Eclipse's OSGi-based SOA framework
OpenID: Leveraging a widely accepted identity Web service

Apache Web services
SOA for pets uses REST and SOAP
More coders feeling Groovy
SpringSource buys Covalent
Sun acquiring MySQL
IBM says it's sticking by Geronimo
Geronimo's days numbered?
Apache Wicket with Ajax updates
When choice is Ajax or Flex
Apache releases open source ESB
CXF, Web services tutorial

Open source Web services
Sun shops for more open source
BPEL4People added to server
LAMP coders go hybrid route
WSO2 offers Spring Web services framework
Hyperic offers Web app management
WSO2 releases mashup server
New open source portal released
HP open sourcing governance
IBM Jazz ready for prime time
Early reviews pan Wikia Search

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2001 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts