Chapter 7. Providing SOAP-Based Web Services


Web services have been available in Java for years, but working with them as a developer has been a complicated process, involving a great number of brittle steps. With the advent of Java EE 5, much of this complexity has been reduced. Deployment descriptors have given way to annotations, and much of the boilerplate work is generated for you.

Despite this good news, doing web services in the real world remains very tricky. The actual complexity of web services is still very real; the fact that we are shielded from some of the grunt work does not change how the plumbing works. Writing maintainable, flexible code that prevents vendor lock-in as much as possible is a challenge on any project. The added flexibility in Java EE 5 gives us more options; which is terrific, but it also presents us with a new array of configuration and implementation choices that can be daunting to the novice. So we have a lot of work ahead of us to figure out how all of the pieces go together.

If you have worked with web services in previous versions of Java, you can build on your background knowledge, but the new APIs represent a fundamental change in how we as web services developers approach our work. Here are some of the ways in which the world has changed with Java EE 5:

  • No need to write webservices.xml deployment descriptor. This file used to be mandatory. Now, instead of a single web services-related descriptor file, annotations handle all of that ...

Get Java SOA Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.