Friday, May 13, 2016

Axis 2

Axis 2 is a web service/SOAP/WSDL engine provided by Apache. It is a java based implementation.

Think about a bank doing day to day transactions on their hundreds of branches and each one of them are connected with each other. In this scenario, you can understand that the computing resources are “Distributed” among several locations (Branches). To achieve this kind of computing need, we use a Distributed Computing System in which the computers and resources are distributed in several physical and logical locations.

These systems need to be developed as separate systems but they need to be interconnected when needed and all of these systems should be accessible from the web interface which is present at the computers of bank officers. We can develop these systems as Services and then we can inter-connect these services in to a common architecture (platform). This kind of system is called as a Service Oriented Architecture (SOA).


Representation of what is happening inside an axis2 engine :



Handlers

Handler is the message interceptor. Which intercepts the messaging flow and does whatever task it is assigned to do. In fact, the interceptor is the smallest execution unit in a messaging system.

Handlers, in Axis, are stateless, meaning they do not keep their past execution states in memory.
Handler can read SOAP messages, remove elements from the message (mostly headers), add new elements (headers), or modify elements as well as add, delete,
or modify content from the Message Context.




Phases


The concept of a phase is introduced by Axis2 and it was mainly to support the dynamic ordering of handlers to provide better extensible, and better flexibility of the handler chain. A phase can be defined in various ways:
•  It can be considered as a logical collection of handlers
•  It can be considered as a specific time interval in the message execution
•  It can be considered as a bucket into which one can put his/her handler
•  One can consider a phase as a handler too


Pipe (Flow)

A flow is the message pipe where the message enters from one end of the flow and leaves from the other end of the flow. A flow or execution chain can be considered as a collection of phases.
At a very high level, what the engine really does is call the invoke method of each phase in a given flow, and then the phase will sequentially invoke all the handlers in it.

No comments:

Post a Comment