Via Jérôme: Yesterday Sun proposed a new JSR (311) to provide a simple REST API for Java. Initial thoughts:
- Cool!
- The servlet API is not ideal, this is needed.
- I hope they don’t screw it up (see JAX-WS).
Update: Based on Marc Hadley’s post, maybe we won’t have to worry about #3.
Update 2: Steve Loughran and Stefan Tilkov have important things to say. Steve says he will join the expert group if I do (seeing that Stefan, Mark Baker, and Bill de Hora already have), so I submitted a request. Steve?
{ 8 } Comments
Dare I ask what you think is so screwed up about JAX-WS (besides that it implements WS-*)? Or are you referring to the JAX-WS implementation of RESTful web services?
Chris: I’ll let others talk for me. Steve Loughran says it best here, pointing out the flaws in JAX-RPC. And as my colleague, Richard Monson-Haefel, points out, JAX-WS isn’t that much better.
Thanks Pete. I’ve been using the new JAX-WS 2.1 RI and haven’t found it nearly as difficult as RMH has indicated. But maybe 2.1 is just that much better than 2.0 (which is what he tested).
I understand Steve Loughran’s issues with XML bindings to data objects– but I’m not so sure that you’ll avoid that issue in JSR-311 either. But you should, of course, avoid the issues with RPC-like calls.
I’ve tried many SOAP stacks for contract-first services, and so far, I’d only consider using XFire and JAX-WS 2.1. Speaking of XFire, Dan Diephouse (big committer on XFire) also mentions JSR-311 in his blog: http://netzooid.com/blog/2007/02/14/jsr-311-javaxwsrest/
Anyway, thanks for the reply and links. I always enjoy your blog, even if I don’t always agree with it.
I’m not so sure that you’ll avoid [XML bindings to data objects] issues in JSR-311 either.
If JSR-311 mandates an XML to Java mapping, then they’ve lost before they’ve begun.
I’m probably jumping the gun and should not have said that. I really don’t know… but, there is such a strong emphasis on making it *easy* that I wouldn’t be surprised by it (plus it seems it might be tied to JAX-WS).
But there are actually two good indications that perhaps I’m wrong about the XML to Java mappings:
1) The JSR says… “and also enable low level access in cases where needed by the application.” This may mean getting right at the XML.
2) JAXB is not listed under contributions. It seems if they were planning on Java to XML mappings, it would be listed there (like it is for the JAX-WS JSR).
All this to say that I was only speculating. I certainly don’t want to start any rumors!
I debunked RMH’s JAX-WS FUD long ago
http://blogs.jboss.com/blog/jgreene/
Hi,
I am a Development Editor with Packt Publishing Pvt Ltd. We are coming up with a book on “RESTful Java Web services”. We are looking for reviewers to provide feedback on the technical content of the book. It would be of great help if you could review the book for us. Please visit http://www.packtpub.com/author_reviewing_for_packt for more details regarding reviewing.
Please let me know if this interests you.
Thanks & Regards,
Siddharth Mangarole
Development Editor
[Packt Publishing]
Good articles should share to every person ,hope you can write more and more good articles.
{ 2 } Trackbacks
JSR 311: Java API for RESTful Web Services…
I was planning to wait until after the ballot to blog this but it seems lots of folks have already noticed and blogged about it so I figure I might as well put my 2p in now. Reaction so far……
[...] Pete Lacey [...]
Post a Comment