Apr 5, 2008

SOA Using Java Web Services

Java became a powerful development platform for Service-Oriented Architecture (SOA) in 2006. Java EE 5, released in May 2006, signi.cantly enhanced the power and usability of the Web Services capabilities on the application server. Then Java SE 6, released in December 2006, incorporated the majority of those capabilities into the standard edition of the Java programming language.

Because robust Web Services technology is the foundation for implementing SOA, Java now provides the tools modern enterprises require to integrate their Java applications into SOA infrastructures. Of course, Java has had basic Web Services capabilities for some time. JAX-RPC 1.0 was released in June 2002. J2EE 1.4, .nalized in November 2003, included JAX-RPC 1.1. So what is signi.cant about the latest versions of the Java Web Services (JWS) APIs?
The answers are power and ease of use. Programmers will .nd it much easier to build enterprise-class applications with Web Services in Java EE 5 than in J2EE 1.4. Evidence of that is contained in Chapters 9 and 10, which describe an application I developed to integrate online shopping across eBay, Yahoo! Shopping, and Amazon. It’s a pure Java EE 5 application, called SOAShopper, that consumes REST and SOAP services from those shopping sites. SOAShopper also provides its own SOAP and REST endpoints for cross-platform search, and supports an Ajax front-end. SOAShopper would have been a struggle to develop using J2EE 1.4 and JAX-RPC. With the new Java Web Services standards, it was a pleasure to write.

This book focuses on the following standards comprising the new Java
Web Services:
1. JAX-WS 2.0 [JSR 224]—The Java API for XML-Based Web Services.
The successor to JAX-RPC, it enables you to build and consume Web services with Java.

2. JAXB 2.0 [JSR 222]—The Java Architecture for XML Binding.
Tightly integrated with JAX-WS, the JAXB standard controls how Java objects are represented as XML.

3. WS-Metadata [JSR 181]—Web Services Metadata for the Java Platform.
WS-Metadata provides annotations that facilitate the .exible de.nition and deployment of Java Web Services.

4. WSEE 1.2 [JSR 109]—Web Services for Java EE. WSEE de.nes the programming model and run-time behavior of Web Services in the Java EE container. These standards contain a few big improvements and many little enhancements that add up to a signi.cantly more powerful Web Services programming platform.
New annotations, for example, make it easier to write Web Services applications. And the delegation, in JAX-WS 2.0 [JSR 224], of the Java/XML binding to JAXB 2.0 [JSR 222] greatly improves the usability of JAX-WS as compared with JAX-RPC. The deployment model has been greatly simpli.ed by WS-Metadata 1.0 [JSR 181] and an improved 1.2 release of WSEE [JSR-109].

Chapters 1 and 2 review these JWS standards in detail and describe how they improve on the previous set of JWS standards. Chapters 3 through 10 focus on writing code. To really understand the power and ease of use of the new Java Web Services, you need to start writing code. And that is primarily what this book is about. Chapters 3 through 10 are packed with code examples showing you how to best take advantage of the powerful features, avoid some of the pitfalls, and work around some of the limitations. Chapter 11 looks to the future and offers some ideas, along with a prototype implementation, for a WSDL-centric approach to creating Web Services that might further improve JWS as a platform for Service-Oriented Architecture.

I started writing this book in 2002, when JAX-RPC .rst appeared on the scene. I soon ran into trouble, though, because I wanted it to be a book for programmers and I had a hard time writing good sample code with JAXRPC. Four years later, when I started playing around with beta versions of the GlassFish Java EE 5 application server, I noticed that things had signi.- cantly improved. It was now fun to program Web Services in Java and I recommitted myself to .nishing this book.
The result is a book with lots of code showing you how to deal with SOAP, WSDL, and REST from inside the Java programming language. Hopefully this code, and the writing that goes with it, will help you master Java Web Services and enable you to start using Java as a powerful platform for SOA.

Filetype : pdf
First printing, April 2007
Page : 605
Download SOA Using Java Web Services

0 comments: