RESTful web service WSDL???

Hello,

Going down the path of creating some web services. I am going with using REST over SOAP. Where I am a bit lost is with regards to the WSDL. If I understand correctly the WSDL will allow consumers of my web services the ability to generate stubs in their code of choice. The XML will be abstracted by APIs generated by the WSDL on the client end.

Using the RESTful approach how does one generate a WSDL for the client? I believe SOAP takes all this into account. Am I missing the best way to approach this?

How does one publish the RESTful web service(s) if not by WSDL?

thanks, Rick

Rick Fiorentino wrote:

Hello,

Going down the path of creating some web services. I am going with using REST over SOAP. Where I am a bit lost is with regards to the WSDL. If I understand correctly the WSDL will allow consumers of my web services the ability to generate stubs in their code of choice. The XML will be abstracted by APIs generated by the WSDL on the client end.

Using the RESTful approach how does one generate a WSDL for the client? I believe SOAP takes all this into account. Am I missing the best way to approach this?

How does one publish the RESTful web service(s) if not by WSDL?

thanks, Rick -- Posted via http://www.ruby-forum.com/.

Couple of things to keep in mind:

1. RESTful apps tend to follow conventions, making the need for method- by-method specs obsolete. Rails implements its own flavor of REST conventions, whereby if you know the resource (say, products), then you already know the urls and HTTP verb combinations that are available. 2. WSDL helps generate client-side tools, but you still need human documentation to understand what to do with it. RESTful services should also provide human documentation so you know what urls and verbs are supported.

Jeff

As has already been said, RESTful services rely far more heavily on conventions and already documented standards than SOAP. A well set up RESTful service will be much easier for the client developer to understand than your average SOAP service.

WSDL was somewhat helpful for working with SOAP services, but it was far from ideal for a variety of reasons including its heavy reliance on the ridiculously complex XML schemas. A WSDL alone was never enough for anyone but the most hardcore of SOAP developers.

Usually you’ll be able to get away with a human-readable list of your resources, what parameters they expect, etc. There isn’t (yet?) anything standardised for machine-readable resource lists but there is some buzz around WADL – http://en.wikipedia.org/wiki/Web_Application_Description_Language

If you haven’t already, it’s worth reading some of the discussion of REST (in a more general sense than just how it works in Rails) around the web. http://www.tbray.org/ongoing/When/200x/2007/04/30/REST-is-easy would be one place to start.

James.