The rest of the soap
At work we have a couple of projects which have leapt to the forefront of our priority list, which basically means that I won’t be able to work on Beyond at work for the next two weeks or so. But fear not, that’s what spare time is for. :) I wish I didn’t have classes this term, though, because homework’s eating up a lot of it.
Anyway, I’m looking into SOAP vs. REST for the web services part of Beyond. Looks like Google’s built on SOAP, Flickr provides both SOAP and REST interfaces, and Ruby on Rails seems to favor SOAP as well. The general feeling I’ve gotten from reading blog posts and articles about the debate is that SOAP is more complicated. What I’ve seen of REST certainly was simpler. I’ll look into it some more and see if it would be worth my time to support both, like Flickr. Anyway, once I get some time I’ll try to cook up a little test app to make sure I understand how web services work, sending XML back and forth like tennis players at Wimbledon.

Technorati Tags:
Posted in 


Interesting, I always got the impression that Ruby on Rails was very much focused on REST. I really haven’t looked at their web services, so maybe I’m confusing their RESTful web preferences with their web service structure.
Anyway, I’ve always liked Ted Newards somewhat pragmatic approach to this. I can’t find a working link right now, but his basic point is to take your REST services and wrap them in a SOAP header. It’s easy for non-SOAP folks to just unwrap the header and grab the content, and SOAP folks can just consume it. I’ve never tried it in practice, but it sounds feasible.
Just to clarify, I should’ve send SOAP envelope instead of SOAP header.
The place I think I got the idea that RoR is more SOAPy was Wikipedia:
Regardless, I really like that idea of wrapping the REST service in a SOAP envelope. I wonder if Flickr does that… If you do find a link (I couldn’t find one either), let me know.
I found some links:
http://www.theserverside.com/talks/index.tss (Ted Neward, down the page a little)
http://www.intertwingly.net/stories/2002/07/20/restSoap.html
I also have slides from a presentation I attended by Ted Neward where he goes more in depth. I’ll shoot those to you in email once I find them.
REST is easier to use since you can test queries in your browser and you don’t usually need any special libraries to access REST services.
SOAP is more complicated. In PHP it requires PHP 5 or the NuSOAP library. But once I got it, after a steeper learning curve, it seemed more magical.
Yahoo uses REST in (almost?) all of its web services. I particularly like that you can append “&output=php” and it will return a string of character that you can unserialize() into an array. It makes it almost like SOAP but much much easier.