Book Image

Service Oriented Architecture with Java

By : Binildas A. Christudas, Malhar Barai, Vincenzo Caselli
Book Image

Service Oriented Architecture with Java

By: Binildas A. Christudas, Malhar Barai, Vincenzo Caselli

Overview of this book

<p>Service Oriented Architecture provides a way for applications to work together over the Internet. Usually, SOA applications are exposed through web services.<br /><br />Web services have been around for a while, but complex adoption processes and poor standardization hampered their use at first. However, with the adoption of new, simpler protocols such as REST, and major companies supporting SOA, the time is now right to adopt these standards.<br /><br />This book will show you how to build SOA, web services-based applications using Java. You will find out when SOA is the best choice for your application, how to design a sound architecture, and then implement your design using Java.<br /><br />The book covers the important web services protocols: XML-over-HTTP, REST, and SOAP. You will learn how to develop web services at all levels of complexity and for all kinds of business situations.</p>
Table of Contents (11 chapters)

Web Service Using XFire


XFire is a new generation Java SOAP framework. XFire API is easy to use, and supports standards. Hence XFire makes SOA development much easier and straightforward. XFire is also highly performance oriented, since it is built on a low memory StAX (Streaming API for XML) model. Currently, XFire is available in version 2.0 under the name CXF.

Web Service Implementation in XFire

You have already seen implementing web services in Axis and Spring, by creating standard web archives and deploying them into web servers. Now, we will do a similar exercise here, but in a relatively lightweight manner, using XFire. Here, we assume you have already downloaded XFire 1.2.2 version from the URL http://xfire.codehaus.org/Download, and have extracted it to the folder which you can refer to in your examples.PROPERTIES file as xfire.home.

Code Server and Client

For our XFire sample, we have all the code organized in the folder ch03\04_XFire\src. We will now look at them, one by one.

IHello...