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?

Chris M | 14-Feb-07 at 12:59 pm | Permalink
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?
Pete | 14-Feb-07 at 1:42 pm | Permalink
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.
Chris M | 14-Feb-07 at 3:52 pm | Permalink
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.
Marc Hadley's Blog | 14-Feb-07 at 4:11 pm | Permalink
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 | 14-Feb-07 at 4:15 pm | Permalink
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.
Chris M | 14-Feb-07 at 6:47 pm | Permalink
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!
Jason Greene | 15-Feb-07 at 8:31 am | Permalink
I debunked RMH’s JAX-WS FUD long ago
http://blogs.jboss.com/blog/jgreene/
New JSR to define a high-level REST API for Java « Noelios Consulting | 03-Apr-07 at 8:21 am | Permalink
[…] Pete Lacey […]