web services
|
|
hi there, i need to implement web services in my rails 2.0.2 app for external apps to consume. whilst i’d prefer to do things the REST way, i’m struggling to work out what i need to supply (a la WSDL) to the other apps so that they know the structure of the request that they must send me. thanks, phantom |
|
|
Phantom, The ideal of the REST interface is more that it supports a common set of conventions. So there’s no need to provide a WSDL to the clients. It’s just a few standard HTTP calls and processing of XML. Using ActiveResource makes it a seemingly painless process for for Ruby clients – but that doesn’t mean that other languages can’t interface to it. In fact, if you’re looking for some examples of interfacing to a RESTful Rails application from other languages – a good book to look at would be Ben Scofields Practical REST on Rails projects book. In the book, he creates a fairly simple (scaffolded) Rails application and then spends the rest of the chapters showing different ways to interface to it via REST (i.e. from a javascript widget, from a PHP (squidoo i think), facebook, etc, etc. |