Warning: include_once(/home/tabrez/www/talk/mtrefsearch.php) [function.include-once]: failed to open stream: No such file or directory in /home/tabrezsyed/mandalivia.com/talk/archives/000135.php on line 118

Warning: include_once() [function.include]: Failed opening '/home/tabrez/www/talk/mtrefsearch.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/tabrezsyed/mandalivia.com/talk/archives/000135.php on line 118

May 21, 2002

ReST vs SOAP

There is much talk about ReST (Representational State Transfer) and SOAP (Simple Object Access Protocol).

Why do you use SOAP? Say you want to use Google's search apis to get a cached page. Your SOAP query would include half a dozen SOAP envelope lines and finally explicitly mention every single parameter you are passing in. Your response will be an XML doc (enconsed in a SOAP envelope).

What does ReST say? ReST says rather than wrap all that data within a SOAP envelope just call www.google.com/xml?q=searchstring. The results will be returned as XML and you have your answer. Dont bother building all this SOAP stuff around the messages.

Why would you want all this extraneous information? well for one to deal with types and specific data. For example I believe there is a SOAP standard to allow dynamic lookup of interfaces (via UDDI and WSDL I am assuming). The reasoning that resonates with me is compatability of interfaces. For example if I were to publish a translation api that took a search parameter and I changed that parameter tomorrow I believe SOAP provides me more flexibility. I can take the XML gunk that SOAP gives me apply an XSLT transform and get the new version that allows me to service old and new customers.

xml.com has an article about google SOAP apis.

Amazon decided to go the Rest route (kinda). They have a regular old GET string that returns an xml doc. No requirements for a heavy duty SOAP client. Just fetch the URL and parse the XML and you have your data. Apparently google used to expose this via the /xml path. EBay also uses ReST.

Posted at May 21, 2002 09:22 PM

Comments
Post a comment


















Archives
December 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
Recent Entries
Books '05
Eco, Truman
Quotes
Zen koan
Illiberal Democracy
The Cold War vs today
Money
Life stories
Swim with the fishes
Blink of an eye
Categories
aphorisms
books
business
general
history
misc
philosophy
pop-culture
quotes
tech
Blogs
Metafilter
Arts and Letters Daily
Sapta-Sindhu
Beemblog
dineoutindia
Sponsorship