Book Image

Apache Axis2 Web Services, 2nd Edition

By : Deepal Jayasinghe, Afkham Azeez
Book Image

Apache Axis2 Web Services, 2nd Edition

By: Deepal Jayasinghe, Afkham Azeez

Overview of this book

<p>Web services are gaining popularity and have become one of the major techniques for application integration. Due to the flexibility and advantages of using web services, you want to enable Web service support to your applications. This book is your gateway to learning all you need to know about the Apache Axis2 web service framework and its hands on implementation. <br /><br />Apache Axis2 Web Services, 2nd Edition is your comprehensive guide to implementing this incredibly powerful framework in practice. It gives you precisely what you need to know to develop a detailed practical understanding of this popular, modular and reliable web service framework.<br /><br />This book starts with a short and relevant introduction about the Axis2 1.5 framework and then plunges you straight into its architectural model.</p> <p>Learn to use and develop your own modules. Write a services.xml file so efficiently that you'll be creating more complex applications (rather than just POJOs) in no time.</p> <p>Learn how straightforward it really is to turn a Java class into a web service in Axis2. Experiment with different types of sessions in Axis2. Learn different patterns of Enterprise deployment. Ensure reliability in your web service - a major concern in most enterprise applications - with minimum impact on performance.<br /><br />This book will journey you through all this and more, giving you exactly what you need to learn Axis2 1.5 in the easiest way possible and create secure, reliable, and easy-to-use web services efficiently and systematically.</p>
Table of Contents (22 chapters)
Apache Axis2 Web Services
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
15
Building a Secure Reliable Web Service
Index

Why Axis2?


As we discussed earlier, web services are moving rapidly and a lot of organizations have moved to web services field. As a result of this, new requirements are encountered and new standards are defined. Especially, the widespread use of Cloud computing also introduces a number of interesting challenges to the web service world. Most of the commonly used commercial Clouds (for example, Amazon, EC2) use a web service as the main management interface. Now people are looking for web services, which perform fast, have reliability, security, and transaction, and above all usability. In addition to the requirements, new WS-* specifications have defined and web service engine need to support those.

As we discussed in the previous section, Apache Axis1 is one of the most stable and commonly used web service frameworks. So changing Axis1 architecture to support new requirements and new Web service standards was not a feasible option. In the meantime, any software has its own lifecycle: it can evolve up to a certain point and after that revolution is needed. Same theory was applicable for Axis1 as well. As a result, Apache Web Service development project management team decided to start a fresh project to support those new standards and user requirements.

Today, we live in fast moving society where time is very critical for all of us. At a time when we start to improve time in nanosecond level, applications such as stock market millisecond make a huge difference. As a result, performance is a critical factor and having features and providing usability are not enough. Thus, in addition to the new requirements and WS-* specifications, performance was a major concern for Axis2. Axis1 uses DOM as its XML representation mechanisms. As a result of that, complete messages need to load into memory before starting to process, which slows down the system as well as increases the memory usage. Therefore, one of the key challenges was to improve the XML processing and from that improve the overall processing time and memory footprint. To provide better support and faster processing of XML, Axis2 introduced new XML processing framework known as Axiom. It uses pull parsing technology to achieve its requirements.

The Apache Web Service community discussed and agreed to introduce a new web service framework called Axis2, with a number of new requirements as well as a very flexible and easily extensible architecture, to support the current WS-* standards as well as for future standards. That is how Axis2 or the Apache third generation web service engine cames to the industry.

Apache Axis2 not only supports SOAP 1.1 and SOAP 1.2, but it also has integrated support for the widely popular REST-style of web services. The same business logic implementation can offer both a WS-* style interface as well as a REST/POX style interface simultaneously.

Apache Axis2 is more efficient, more modular, and more XML-oriented than the older version. It is carefully designed to support the easy addition of plugin "modules" that extend their functionality for features such as security and reliability:

  • WS-ReliableMessaging: supported by Apache Sandesha2

  • WS-Coordination and WS-Atomic Transaction: supported by Apache Kandula2

  • WS-Security: Supported by Apache Rampart

  • WS-Addressing: module included as part of Axis2 core

Axis2 comes with many new features, enhancements, and industry specification implementations:

  • 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.