Tuesday, April 26, 2005

The SOAP vs. REST Debate

I'd never even heard of this issue until my colleague opposite mentioned it. Apparently SOAP isn't the only way to go with regard to web services.
REST (Representational State Transfer) can be a simpler alternative for web services, at least those which don't have a fantastically detailed structure which can realistically only be managed using XML schemas. In REST, rather than using POSTing XML documents back and forth, just use URIs and the HTTP GET method, and put the parametes in the URI using the well-known ?param=value¶m2=value&etc... style.
Amazon web services offer the alternatives of using SOAP or REST to interact with them. In the case of REST you send an HTTP request with some parameters and get an XML document back. This could well be easier if you are using something like PHP for your business logic. However with Java/J2EE it's pretty easy to build Java classes directly from WSDL which use SOAP under the covers, and you just instantiate the classes and thereby interact with the service as though it were a local Java class.

I found a nice, simple discussion of the debate here.
Well - you learn something every day...

Links to this post:

Create a Link

<< Home