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

Setting up a simple Axis2 cluster


Enabling Axis2 clustering is a simple task. Let us look at setting up a simple two node cluster:

  1. Extract the Axis2 distribution into two different directories and change the HTTP and HTTPS ports in the respective axis2.xml files.

  2. Locate the "Clustering" element in the axis2.xml files and set the enable attribute to true. Start the two Axis2 instances using Simple Axis Server. You should see some messages indicating that clustering has been enabled. That is it! Wasn't that extremely simple?

  3. In order to verify that state replication is working, we can deploy a stateful web service on both instances. This web service should set a value in the ConfigurationContext in one operation and try to retrieve that value in another operation. We can call the set value operation on one node, and next call the retrieve operation on the other node. The value set and the value retrieved should be equal.

Next, we will look at the clustering configuration language in detail.