25 March 2005

SOAP. SOAP. What is SOAP?

Since I've got some free time on my hands (while I look for a new job), I decided it'd be a good idea to get caught up on current technology - and first up is SOAP/SOA/WS-*, etc.

I've actually used SOAP and Axis on a couple of projects now, but only in a sort of peripheral manner. In fact, in both cases, the presence of a web service interface was more related to marketing than actual customer demand (you know - "let's put a web service interface on so we can say our product supports SOAP"). And since the web services part wasn't part of the core architecture, I've never spent much time really investigating and trying to understand the why's and wherefore's of SOAP and Web Services.

So, last week, I went out and picked up the dead tree version of Building Web Services with Java. (I had hoped to find something on O'Reilly's Safari Bookshelf since I do have a subscription, but it seemed like everything there was at least two years old.)

Berfore I go on, I should point out that I've been a pretty strong believer in the REST architectural style and, over the past three or four years, I've made a pretty concerted effort to adhere to those principles in the solutions I've designed and built. I'm very much aware that there's a sort of SOAP/WS-* vs REST mentality out there right now, but I really dont know enough about SOAP and WS-* to know where I might fall in that debate. At this point, from what I've read so far I have what you might call a healthy skepticism for SOAP and WS-*.

So far, and for the most part, I like the book. Despite the fact that the authors seem to think Web Services are the greatest thing since sliced bread, they do manage to take you through all the pieces that are involved - XML, SOAP, Web Services - and they bring up just enough of the issues that Web Services are trying to address to make you think a little bit. There are a few sidebars that compare to REST and WS-*, but they're pretty superficial and it seems like they're only there to make the presentation look balanced.

So far, there haven't been any surprises. I've either heard of or have actually used most of the technologies they've covered - XML and XML Schema, SOAP, WSDL, UDDI, Axis, etc. However, I can't help but to keep asking myself "What happened to the web in Web Services?"

Two things strike me. One is that, despite the use of URIs for just about everything that needs a name, almost none of them actually identify a resource that's on the web. The only thing that even comes close is the service endpoint, and that's barely on the web since all of the useful stuff is hidden behind the service.

The other thing that bugs me is the use of HTTP is a transport protocol. Other than the fact that HTTP flows freely through firewalls, what's the point? Only one verb, POST, is ever used (although I do see that you can now do certain operations using GET as well). I keep asking myself why they didn't just come up with the SOAP Message Transfer Protocol. Well, OK, the acronym for that might cause just a little confusion, but still. Maybe I just need to read more and I'll understand.

(In case you're wondering, the title is a reference to a bit from a Sponge Bob Squarepants episode.)

No comments: