Well I guess you have come to this page with the intention of learning something about Apache Axis2. If you search for google the word "Apache Axis2", you may get millions of pages. But most of them have some pre-requisites before teaching you about Apache Axis2. My intention with this post is to share my experience about learning Apache Axis2 from level zero. If you have used a computer and know how it works, that would be enough.
Since you have used computers, you might know what it does. It does some computing task for you. All the processing, memory, power, data all the components are within a single place and that is what you called your personal computer. That is enough for processing your word document, print your photograph and many more personal things.
Let's think about something bigger than your computing need. 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.
Now you know what is a distributed computing system. Let's figure out how this system really works to achieve the requirement of the banking system. Let's say Bank has following main systems.
Since you have used computers, you might know what it does. It does some computing task for you. All the processing, memory, power, data all the components are within a single place and that is what you called your personal computer. That is enough for processing your word document, print your photograph and many more personal things.
Let's think about something bigger than your computing need. 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.
Now you know what is a distributed computing system. Let's figure out how this system really works to achieve the requirement of the banking system. Let's say Bank has following main systems.
- Fixed Deposit system - Handle the FD related tasks
- Pawning system - Handle the Pawning related operations
- Micro Finance system - Deal with the leasing, loans related operations
- Savings/Current account system - Handle account related tasks
- Credit Card system - Deal with credit cards
- Inter Bank transaction system - Handle Bank to Bank transactions
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).
Now we have a basic understanding about the SOA and what it does. Let's move in to the implementation of the above mentioned architecture. Since we are having few systems, we need to interconnect these systems in a reliable and efficient way. From now on we'll call these systems as Services. To connect this kind of services with each other we have the following 03 options.
- Java Messaging System (JMS)
- Plain Old XML (POX) with REST services
- Web services with SOAP
REST(REpresentational State Transfer) with POX is a heavily used methodology to connect services or applications in WorldWideWeb (WWW) or in the internet. But the limitation with this mechanism is it only supports few operations (GET, POST, UPDATE, DELETE) .
SOAP(Simple Object Access Protocol) with Web Services is the most convenient and feature rich methodology to connect different services or applications in an efficient way. This methodology will overcome all the limitations which the above two methods had.
Now this is getting a bit complicated. But don't worry if you don't understand some of the words mentioned in the previous paragraph since we are not using them heavily in the preceding sections except few.
So we are going to implement our Banking system with Web Services and SOAP messaging system. For this to be implemented we need a comprehensive platform to work with. Apache SOAP was the first web service platform which provided the "proof of concept" for the web service implementation. That system allowed the users to connect different web services with the SOAP messaging. But when we consider the requirements of a banking system we need a more sophisticated system which is capable of handling advanced features like reliable messaging, security, transactions, etc.
Apache SOAP framework has evolved in to Apache Axis project. This project had some of the above mentioned features but not the entire set. This project was a huge success in the Apache community as well as in the industry. We can use the Apache Axis framework to implement our banking system and connect different services with reliable messaging and security.
When the Bank is growing and the challenge is coming from the competitors, bank need a faster transactions and more powerful features to compete with them. This is where Axis2 comes in to the picture. It has the following features.
- Speed: Axis2 uses its own object model and StAX (Streaming API for XML) parsing to achieve significantly greater speed than earlier versions of Apache Axis.
- AXIOM: Axis2 comes with its own lightweight object model, AXIOM, for message processing, which is extensible, performs highly, and is developer-convenient.
- Hot deployment: Axis2 is equipped with the capability of deploying web services and handlers while the system is up and running. In other words, new services can be added to the system without having to shut down the server. Simply drop the required web service archive into the services directory in the repository, and the deployment model will automatically deploy the service and make it available for use.
- Asynchronous web services: Axis2 now supports asynchronous web services and asynchronous web services invocation using non-blocking clients and transports.
- MEP support: Axis2 now comes handy with the flexibility to support Message Exchange Patterns (MEPs) with in-built support for basic MEPs defined in WSDL 2.0.
- Flexibility: The Axis2 architecture gives the developer complete freedom to insert extensions into the engine for custom header processing, system management, and anything else that you can imagine.
- Stability: Axis2 defines a set of published interfaces, which change relatively slowly, as compared to the rest of Axis.
- Component-oriented deployment: You can easily define reusable networks of Handlers to implement common patterns of processing for your applications or to distribute to partners.
- Transport framework: Axis2 has a clean and simple abstraction for integrating and using Transports (that is, senders and listeners for SOAP over various protocols such as SMTP, FTP, message-oriented middleware, and so on), and the core of the engine is completely transport-independent.
- WSDL support: Axis2 supports the Web Service Description Language (versions 1.1 and 2.0), which allows you to easily build stubs to access remote services, and also to automatically export machine-readable descriptions of your deployed services from Axis2.
- Add-ons: Several web service specifications have been incorporated, including WSS4J for security (Apache Rampart), Sandesha for reliable messaging. Kandula is an encapsulation of WS-Coordination, WS-AtomicTransaction, and WS-BusinessActivity.
- Composition and extensibility: Modules and phases improve support for composability and extensibility. Modules support composability and can also support new WS-* specifications in a simple and clean manner. They are, however, not hot deployable, as they change the overall behavior of the system.
Now you know that Apache Axis2 is a feature rich and advanced web service framework which you can use to implement your SOA system such as the Banking system described in the beginning of this article. You can implement reliable messaging, security, transactions and other required features for the banking system implementation. If you need more information about implementations with the Apache Axis2, you can refer the Axis2 official web site http://axis.apache.org/axis2/java/core/
This article has been prepared with the help of the book "Apache Axis2 Web Services 02nd edition" by Afkham Azeez and Deepal Jayasinghe.
Comments
Post a Comment