Right tool for the job
February 5th, 2008I feel the need to repost my latest posting from The Server Side here…
James Watson writes:
Personally I would like to see a good open source framework for REST based web services. I’m not sure if it’s the way to go but WSDL 2.0 spec should theoretically support REST. I’m unaware of any tools that help with creating these types of WSDLs.
Don’t use WSDL 2.0 for REST. It’s an ugly way of doing RESTful services IMNSHO. There are plenty of great toolkits out there for helping you build RESTful web services. The ones I have my eye on are:
- Restlets
- JAX-RS RI – aka Jersey allows you to build services easily with annotations. CXF has support in the works too.
- Apache Abdera – Build AtomPub services with Abdera. These are quite powerful…
Please keep in mind that REST and SOAP programming models don’t mix well. There is this complete fallacy going around (I succumbed to it too at one point) that you can use the same service class or description to build a RESTful and a SOAP based service. However, the interactions and mappings should end up being completely different from one to the other! One is message based and one is resource based. You’re going to have to design your service differently as they’re two completely different beasts.
Use the best tool for the job. You’ll save yourself time and a lot of hassle.
February 6th, 2008 at 2:59 am
Jersey, JSR-311 is JAX-RS RI not JAX-WS RI.
February 6th, 2008 at 10:43 am
Thanks. I’ve spent too many years typing “JAX-WS”…
February 6th, 2008 at 11:24 am
But there really isn’t anything like WSDL for REST , is there ? The fight is still out there whether you need it or not .. where do you stand on that , Dan ?
February 6th, 2008 at 11:31 am
I’ve responded in detail here:
http://furiouspurpose.blogspot.com/2008/02/rest-and-soap-and-right-tool-for-job.html
Basically agree that REST/SOAP /should/ be built on a different service model, although I’d argue that they CAN be placed on the same service model, it’s just usually not a good idea.
Restlet’s pretty good, Jersey, I’m watching with interest, and Enunciate isn’t bad, but definitely needs more time. I haven’t tried Abdera.
February 7th, 2008 at 4:32 pm
[...] « Right tool for the job [...]
May 21st, 2008 at 10:38 am
>>Please keep in mind that REST and SOAP programming models don’t mix well.
Yes I think I need to accept this to some extent, because I tried it recently and sending back HTTP response messages as Response for soap Operations also.
Link: http://soa2world.blogspot.com/2008/05/rest-and-ws-service-same-service-using.html
I personally felt it wasn’t a ideal way but is it completely wrong ? At least for a very simple system like the one I demonstrated (a single resource Employee) I though it was good enough.