 | Level: Intermediate Contributors: W3C 06 Feb 2007 Updated 25 Apr 2007 The SOAP protocol allows you to use XML to
communicate between systems that are connected using lower-level
Internet protocols. It provides a standard envelope for XML information
to be transmitted through network messages, and optional conventions for
the body of such messages. Understand the history of SOAP, as well as
its relation to Web services, Service-Oriented Architecture (SOA), and
Representational State Transfer (REST).
SOAP
[W3C Recommendation] (which officially is no
longer an acronym despite the capitalization) is a protocol for using
XML to communicate between systems that are connected using lower-level
Internet protocols. Many consider SOAP the foundation of XML Web
services, a set of technologies for managing and organizing the
interaction of systems connected using XML data formats and Internet
communications protocols. SOAP was originally developed among a small,
odd assortment of individuals from a diverse mix of companies, including
IBM®. It quickly grew in popularity, because it provided similar
capabilities to earlier efforts toward XML messaging, but with a more
solid architecture and more commercial support. Development of SOAP
passed to the World Wide Web Consortium (W3C), which developed SOAP 1.2,
having made a lot of architectural improvements but having also made a
lot of controversial compromises. The SOAP protocol defines an XML
envelope format, which can contain a pseudo-XML payload (the fact that
the actual payload of a SOAP message is restricted from using the full
capabilities of XML is a matter of great contention).
XML Web services are closely related to a more general
concept called Service-Oriented Architecture (SOA), but neither
of these concepts, despite common misconception, mandate SOAP. A large
group of people advocate the idea of simply exchanging raw XML documents
directly over HTTP, an approach loosely advocated under the banner of Representational State Transfer (REST). REST is the name
given to the architectural style of the Web by one of its architects,
Roy Fielding. Advocates of REST style for Web services complain that
SOAP is complex, stunts its XML payload, and doesn't take enough
advantage of the fundamental strengths of the Web. SOAP advocates have
worked to address these matters, by shifting emphasis from SOAP's remote
procedure call (RPC) roots to what is called the document-literal
style of SOAP. In the RPC style, the data to be transmitted is
marshalled into discrete data types in a special XML payload format
(called the SOAP encoding). In the document-literal style, the
XML payload consists of more natural XML formats that generally tend to
be more descriptive and human-readable.
The SOAP
edifice
A huge array of standards build on SOAP, but these are
outside the scope of this specification. The following resources are
good sources of information on these standards:
One antecedent of SOAP that is still in fairly wide use
is
XML Remote
Procedure Calls (XML-RPC)
[community specification]. XML-RPC defines
procedure calls encoded in XML and communicated over HTTP. It retains
some popularity because of its simplicity (the full specification is
less than 10 printed pages) and the fact that most languages and many
application frameworks now have standard or readily available XML-RPC
implementations. It does have some notable weaknesses, including
primitive data typing and lack of support for character encodings (an
astonishing flaw given its use of XML).
Resources
- For an up-to-date introduction to SOAP, see Understanding Web Services specifications, Part 1:
SOAP by Nicholas Chase (developerWorks, May 2006).
- The W3C has an official primer on SOAP,
recommended because of its focus on the XML transport format.
- Python programmers can check out The Python Web services
developer column on developerWorks.
- Follow up on document-literal style SOAP. See Reap the benefits of document style Web services by
James McCarthy (developerWorks, June 2002).
- For a good introduction to the idea and motivation
of REST, see Paul Prescod's Second
Generation Web Services (XML.com, February 2002) and REST and the Real World (XML.com, February 2002).
- Gain insight into the relationship of REST-style
and SOAP-style Web services in Resource-oriented vs. activity-oriented Web services by
James Snell (developerWorks, October 2004).
- The REST
Wiki features many links to introductory material about REST.
- Perl users who are interested in XML-RPC should
start with Using XML-RPC for Web services: Getting started with XML-RPC in
Perl and its follow-up, Using XML-RPC for Web services: XML-RPC Middleware, both by
Joe Johnston (developerWorks, March 2001).
- Python users who are interested in XML-RPC should
start with The Python Web services developer: XML-RPC for Python
by Mike Olson and Uche Ogbuji (developerWorks, September 2002).
- Eric Kidd's XML-RPC HOWTO discusses how to use the protocol in
the Java™ language, C, C++, Perl, Ruby, and .NET.
- Read about other XML standards:
Index of XML
standards.
- Participate in any of several XML-centered forums:
XML
zone discussion forums.
- Get involved in the developerWorks community: developerWorks blogs
- Find out how you can become an IBM-Certified
Developer in XML and related technologies at IBM XML
certification.
- See the developerWorks XML Zone for a wide range of
technical articles and tips, tutorials, standards, and IBM Redbooks at
XML
technical library.
- Stay current with technology in these sessions: developerWorks technical events and webcasts.
- Build your next development project with trial
software available for download directly from developerWorks: IBM trial software
|  | |  |