X
Business

Web service development with Java

Web services promote platform neutrality and interoperability, but a language must be chosen for development. This book is a good fit if Java is your choice.
Written by Tony Patton, Contributor

Web services promote platform neutrality and interoperability, but a language must be chosen for development. This book is a good fit if Java is your choice.

The hype surrounding Web service technologies continues to swell, with acronyms like XML, UDDI, WSDL, and SOAP becoming commonplace. Both Microsoft and Sun have recast their direction to embrace Web services with .NET and Sun ONE. Consequently, it was only a matter of time before developers wanted to dig into these technologies. The latest offering from O’Reilly, Java Web Services, provides a roadmap for Java developers.

A little of everything
Web services offer a platform- and language-neutral approach, but developers must choose a language to actually develop a Web service. If Java is your choice, this book attempts to provide every relevant bit of information.

Individual chapters focus on the various Web service technologies (with a Java spin): SOAP, WSDL, and UDDI. According to the book, these technologies are the foundations of a Web service. Each chapter includes a good amount of Java code to drive home the message.

Where to begin?
The book begins with a brief overview of the concept of Web services and a discussion of factors affecting adoption of the technology. I found the adoption discussion very interesting; it presents other comparable technologies and explains how they were adopted. A discussion of the service-oriented model follows and provides more insight into the why, how, and what of Web services.

The acronyms
As I stated earlier, chapters are devoted to SOAP, WSDL, and UDDI. Actually, two chapters cover SOAP; the second chapter focuses on SOAP error handling and misconceptions. Again, this chapter provides valuable information relating to the development of SOAP and how to handle different SOAP versions. The UDDI and WSDL chapters provide introductions and lots of code to get your feet wet. Once these foundation technologies are thoroughly introduced, the core Java technologies are covered.

Java enterprise technologies
Microsoft got a jump-start with integrating Web services into the .NET framework. Sun answered with the Java Web Services Developer Pack. It is an all-in-one toolkit containing the necessary technologies for building Web services with Java, including messaging, processing, registry, and deployment tools. The book covers Java API for XML-based RPC (JAX-RPC) and Java API for XML Messaging (JAXM). I was both happy and surprised, because I haven’t seen other books covering them. Sadly, the book falls short by omitting the remaining aspects of the toolkit. The main focus is on using SOAP with JAXM and JAX-RPC.

Another chapter is entitled “J2EE and Web Services,” but a better title would have been “SOAP and Web Services.” The chapter is devoted to discussing how SOAP and J2EE are used together, including approaches to parsing SOAP messages, using RPC, and a lengthy example utilizing Java Message Service (JMS). It concludes with a brief discussion of emerging standards with coverage of the BEA-backed Java Web Service (JWS) initiative.

The good, bad, and ugly of interoperability
By far, my favorite section of the book is Chapter 9, which is devoted to the dreamland of interoperability that is lauded by Web service pundits but falls short in the real world. This chapter is a reality check for those who think Web services are the answer to all of our problems. It details many of the pitfalls and problem areas, and introduces the SOAPBuilders discussion group that was created to promote interoperability as SOAP matures. (New versions are released, and yes, these standards are still subject to the issue of different versions.) Another aspect covered in this section is .NET and J2EE Web service interoperability; it’s really good stuff.

What about security?
The book closes with a brief look at approaches to Web service security, including XML security (such as digital certificates and encryption) as well as SOAP security. Examples are included using Java toolkits from IBM and Phaos.

Lather up!
I have always loved O’Reilly books, and I found the information presented in Java Web Services very useful. However, the book focuses its efforts almost entirely on SOAP. There is overlap with other O’Reilly titles like Programming Web Services with SOAP and Java and SOAP. The introductory information on each technology can easily be found in other books (with more depth), but the Java samples and commentary on the technologies is certainly valuable.

Editorial standards