J2EE Web Services

J2EE Web Services by Richard Monson-Haefel is the current de-facto standard bible for Web Services development on Java. I had pre-ordered this book on Amazon and have read through this book several times in the last few months and I absolutely love this book. Richard has created a great resource for the J2EE developer that’s looking to build interoperable Web Services.

J2EE Web Services

by Richard Monson-Haefel
Paperback: 960 pages
Publisher: Addison-Wesley Pub Co; 1st edition (October 17, 2003)
ISBN: 0321146182

Most EJB developers are already familiar with Richard Monson-Haefel’s work in his OReilly EJB’s book. He brings that expertise into the realm of J2EE and Web Services. In fact, this is the first book to talk about Web Services Interoperability Organization’s (WS-I) Basic Profile 1.0.

WS-I is an open, industry organization chartered to promote Web services interoperability across platforms, operating systems, and programming languages. WS-I Basic Profile 1.0 is set of recommendations on how to use web services specifications to maximize interoperability. This book delves into the details of J2EE 1.4 and how we as Java developer can build and consume Web Services in a standard way.

The book starts off with an introduction to XML, SOAP, WSDL and UDDI before jumping into the meat, Java API for XML-Based RPC (JAX-RPC). If you don’t have any experience with those technologies, the book offers a great tutorial on those items. I was particularly impressed with the treatment on XML Schemas in the 3rd chapter.

Once the basic groundwork is laid with a solid introduction to XML, SOAP, WSDL and UDDI, the book jumps right in the JAX-RPC platform. In fact, the middle half of the book is dedicated to JAX-RPC. JAX-RPC is a specification for making remote procedure calls via XML and SOAP over HTTP. JAX-RPC provides an easy to develop programming model for development of SOAP based Web services. You can use the RPC programming model to develop Web service clients and endpoints (server).

Once you get an overview of JAX-RPC, you jump right into building Web Services. The section on JAX-RPC is really detailed and offers a very in-depth tutorial on building Web Services. From JAX-RPC, you jump into Java API for XML Registries or JAXR. The Java API for XML Registries (JAXR) provides a uniform and standard Java API for accessing different kinds of XML Registries. An XML registry is an enabling infrastructure for building, deploying, and discovering Web services. I read through most of this section but I didn’t really spend as much time on it as I should have.

The final section of the book deals with deployment. J2EE deployment is a total pain in the ass and anyone that’s spent hours fighting classpath issues in ear files will agree with me. The section on deployment is very detailed and very well written. I found it extremely helpful in setting up JAX-RPC mapping files along with other deployment descriptor. I have to agree with Richard’s comment at the end of Chapter 24 – Deployment descriptors sucks and have gotten overly complicated. Items like Cedric’s ejbc and XDoclet have done a great job in simplified the creation of ejb and web deployment descriptors and J2EE 1.5 should really address this issue.

My only complaint about this book is the lack of downloadable source code. I did email Richard and he very graciously replied saying the book is really more of a reference than a tutorial. Hopefully he’ll change his mind and put together a source code distribution for this book.

If you are going to be building Web Services in Java, want to learn more about the alphabet soup of Web Services or just want to learn more about WS-I and BP1 and how to build interoperable Web Services, this is the book for you. I found this book to be very helpful and plan to use it for my Web Services class. This book is a must for any J2EE Web Services developer.