Frank Sommers
Posts: 2642
Nickname: fsommers
Registered: Jan, 2002
|
|
Re: I'd rather use a socket.
|
Posted: May 21, 2003 10:38 AM
|
|
I agree that plain sockets (or even HTTP) is often a more effective way to develop applications than SOAP. In developing Web services, I found that the task of simply passing messages back and forth involves relatively small amounts of code. The bulk of the code in developing Web services clients comes from having to deal with partial and unexpected network failures, etc. - i.e., with making an application robust. Given that SOAP addresses the message-passing layer, it introduces an overhead that is sometimes counterproductive. I've also found that debugging Web services clients is often much easier when plain XML is sent over HTTP than when SOAP is involved, since that way one gets a lower-level access to the network.
SOAP is perhaps useful when there are complex ways to access a Web service: For instance, it might sometimes make sense to define polymorphic interfaces to a WS such that invoking different methods affects the result messages. In that case, tools can generate Java interfaces from WSDL definitions, and those interfaces would likely be simpler to work with than complex socket-based protocols.
That said, many Web services today are single response-requests. In those simple cases, SOAP is often an unnecessary overhead.
Here's an article I wrote about that issue:
http://www.artima.com/webservices/articles/whysoap.html
|
|