[thelist] Web services - what's the difference?

Dougal Campbell dougal at gunters.org
Mon Dec 16 10:04:01 CST 2002

On Fri, 13 Dec 2002, Peter-Paul Koch wrote:

> [....]
> >So, I code up an API for functions like "which terminal services this
> >zip code?", or "return the full address and phone number for the
> >terminal with termid XYZ", or "return tracking details for tracking ID
> >nnnnnnnn", "what is the standard delivery time between these two zip
> >codes?", etc. Not only can *I* use these functions internally to build
> >tracking information web pages, but our customers can use it to embed
> >our tracking info into their own web sites.
> And how does the embedding work? Suppose I want access to your API for
> looking up zip addresses from my website. I'm with a completely different
> hosting provider and use a different server side language. Do I simply call
> your API and ask it for information? By HTTP or otherwise? Is this
> information always in XML, or can we use other formats?

That depends. I didn't get specific in my example. There are two
primary protocols -- XML-RPC and SOAP. These are very similar in many
ways. XML-RPC uses a very simple XML-based data exchange, using HTTP
(usually) for transport. SOAP has a broader, more detailed
specification, and also mainly uses HTTP for transport, but has support
for other transports (SMTP, FTP, Jabber, direct TCP, etc), as well. And
of course there's Microsoft's .NET, but really that's just SOAP with
some minor tweaks. Most "standard" SOAP services can be coerced into
talking to .NET. And then there's the REST philosophy, which tends to
map HTTP's GET, PUT, POST, etc. into API methods for
retrieving/submitting/modifying data on the remote server.

While XML-RPC and SOAP both use XML to encapsulate the data being
exchanged, a REST solution is typically more free-form (though XML is
often used anyways).

Some references:

I'm fond of REST and XML-RPC, personally. For most of my applications,
the additional complexity of SOAP is overkill. Though, in practice, a
good code library will hide that complexity.

Ernest MacDougal Campbell III, MCP+I, MCSE <dougal at gunters.org>
http://dougal.gunters.org/             http://spam.gunters.org/
  Web Design & Development:  http://www.mentalcollective.com/
       This message is guaranteed to be 100% eror frea!

More information about the thelist mailing list