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

Web service overview


The Internet is revolutionizing business by providing an affordable and efficient way to link companies with their partners as well as customers. However, there are issues that reduce the productivity of the Internet. Among the issues, incompatible applications and frameworks that cannot interoperate or exchange business data are major concerns. Particularly, when using REST-based application, marshalling and unmarshalling data, as well as adding quality of support, is a major concern. Web Service is a new model for e-business that is expected to change the way business applications are developed, integrated and interoperate. Web Services are a self-describing, self-contained, modular application accessible over the Web. It is exposed as an XML interface, as well as it communicates with other services using XML messages over standard web protocols.

The fundamental concept behind web services is the SOA where an application is no longer a large monolithic program, but it is divided into smaller, loosely coupled programs. The provided services are loosely coupled together with standardized and well-defined interfaces. These loosely coupled programs make the architecture very extensible due to the possibility to add or remove services with limited costs. Therefore, new services can be created by combining existing services. To understand loose coupling clearly, it is better to understand the opposite, which is tight coupling, and its problems:

  • Errors, delays, and downtime spread through the system

  • The resilience of the whole system is based on the weakest part

  • Cost of upgrading or migrating spreads

  • It's hard to evaluate the useful parts from the dead weight

In web services, there are three main standard bodies that helped to improve the interoperability, quality of service, and base standards:

  • WS-I

  • OASIS

  • W3C

The main functionality of WS-I is to provide standards and specifications to ensure interoperability, composablity, and profiling. In other words, to create standards and procedures to enforce the required level of interoperability among various web service frameworks. OASIS's main goal is to improve the quality of services of web services, which include security, reliability, transaction, and resource management. W3C, one of the web services standard bodies, defines a web service as a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a format that can be processed by machine and read by human. The format is known as Web Services Description Language (WSDL). Other applications communicate with the web service in a manner prescribed by its description using Simple Object Access Protocol (SOAP) messages, typically conveyed using HTTP with an XML serialization, in conjunction with other web-related standards.

A web service is a well-known open technology standard, which provides a number of benefits as listed here:

  • Increased interoperability, resulting in lower maintenance costs

  • Increased reusability and composablity (for example, use publicly available services and reuse them or integrate them to provide new services)

  • Increased competition among vendors, resulting in lower product costs

  • Easy transition from one product to another, resulting in lower training costs

  • Greater degree of adoption and longevity for a standard, a large degree of usage from vendors and users leading to a higher degree of acceptance

One can argue that the web service concept is the logical evolution from object-oriented systems to systems of services. As in object-oriented systems, some of the fundamental concepts in web services are encapsulation, message passing, and dynamic binding. However, the service-based concept is extended beyond method signatures, as information related to what the service does, where it is located, how it is invoked, the quality of service, and security policy related to the service can also be published in the service interface (WSDL).

How do organizations move into web services?

There are three main ways in which an organization could possibly use to move into the web services, listed next:

  • Create a new web service from scratch. The developer creates the functionalities of the services as well as the description.

  • Expose the existing functionality through a web service. Here the functionalities of the service already exist. Only the service description needs to be implemented.

  • Integrate web services from other vendors or business partners. There are occasions when using a service implemented by another is more cost effective than building from the scratch. On these occasions, the organisation will need to integrate others' or even business partners' web services.

The real usage of web service concepts is for the second and third methods, which enables other web services and applications to use the existing applications.

Web services describe a new model for using the web; the model allows publication of business functions to the Web and provide universal access to those business functions. Both developers and end users benefit from web services. The web service model simplifies business application development and interoperation.