JAX-WS - Too convenient to ignore

Map of the Internet

Heard at the JavaPosse Google group:

I think JAX-WS is one of the more amazing hidden secrets of Web Services. I guess because the SOA pushers would find their business collapsing if Web Services became easy, and JAX-WS makes them incredibly easy indeed.

Some might argue that contract-first is the proper methodology for web services, but I myself find JAX-WS too convenient to ignore.


Nobody thinks that contract first WSDL/XSD is fun; everyone hates writing the schemas. But if you let the runtime generate the interface, you are doing implementation-first web services, which makes your services incredibly brittle.

The people who critique JAX-WS (like myself) don't do it from a position of idelogical purity, we do it because we've had too many bad experiences doing production web services, and implementing soap stacks.

Posted by Steve Loughran on November 20, 2007 at 05:34 PM PST #

Why make the assumption that if you use JAX-WS you can't use contract-first? Write the contract (I think writing WSDL/XSD is fun, as long as you have an editor like Eclipse's to help), use wsimport to generate the classes, implement the generated interface, tell JAX-WS what the impl class is through a small deployment descriptor, and you're done.

Posted by David Matheson on November 20, 2007 at 10:36 PM PST #

-as soon as you map from XSD to Java, you end up with brittle code that hides from the XML, that doesnt support XPath, and dumps a DOM on you the moment you encounter xsd:any.

this isnt just a WS-\* problem either; all the EC2 client APIs that I've seen have the same issue, even if they use its query API.

Posted by Steve Loughran on November 21, 2007 at 05:04 PM PST #

Is there an article somewhere that deals with the contract-first approach with JAX-WS?

Posted by Bill Zborowski on November 29, 2007 at 06:41 AM PST #

"Convenient" is a great way to describe the Netbeans/JAX-RS combo. With a well-defined data model, it's a snap to get started with Jersey, JPA, and Glassfish.

Posted by Jon Crosby on November 29, 2007 at 07:00 AM PST #

Bill, I posted http://blogs.sun.com/arungupta/entry/totd_18_how_to_add describing contract-first approach for Metro.

Posted by Arun Gupta on November 30, 2007 at 09:05 PM PST #

Post a Comment:
Comments are closed for this entry.