Monday, December 10, 2012

What is Axis2?

Axis2 is an open-source framework by Apache Software Foundation to ease the handling of web service requests and responses. Both SOAP and REST type communications are supported by this.

Why is it needed?

If not for such a framework, web service (and service consumer) developers would have to handle tedious operations like message transportation, security and XML parsing, which consume lot of time that can be best utilized for business logic writing.

Also, handling those operations could turn out to be highly error-prone. So, a framework like Axis2 provides tested re-usability and removes the burden from the developers.

How does Axis2 work?

A quick overview...

Axis2 is an extensible framework which consists of number of built-in as well as  customizable modules that can be plugged-in to add specific functionality.

Each module introduces a set of handlers, which do the actual operations/processing.

In each module, the configuration file (module.xml) specifies a phase in which these handlers will be executed. These phases are defined in the axis2's main configuration file (axis2.xml) and they are assigned to two message flows: In Flow (called In Pipe) and Out Flow (Out Pipe).

Handlers defined for In Flow gets executed when a message is received from Axis2 and handlers for Out Flow are executed when a response is sent.


Apart from this architectural overview, it should be noted that Axis2 uses its own object model - AXIOM (Axis Object Model), and StAX (Streaming API for XML) for XML parsing.

Some in-depth workings of Axis2 will be discussed in future posts.


No comments: