WebReference.com - Part 3 of Chapter 3: Professional XML Web Services, from Wrox Press Ltd (5/5)
[previous] |
Professional XML Web Services
Summary
In this chapter we have taken a look at SOAP and how it relates to Web Services. SOAP is a messaging protocol based on XML. The SOAP specification defines a modular architecture for messaging that allows any combinations of message routing, transports, and conventions to be used to build systems. SOAP can be used as a messaging protocol for Web Services, and it is the protocol of choice for most vendors because of its growing acceptance as a standard.
We examined the syntax of the SOAP message itself. SOAP messages have an Envelope
element as the document element, which provides version information. The Envelope
element contains
a Body
element that holds the payload of the message, and it may also contain a
Header
element. The Header
element contains one or more entries that represent
extensions to the message syntax. SOAP defines another standard element, Fault
, which is used
to carry error information inside the Body
element.
SOAP messages contain data, and there are rules for how data types are represented in a message. SOAP defines one set of rules, called SOAP encoding, but new encoding rules can be defined. SOAP encoding relies on XML Schemas for most of its data types, and it adds structs and arrays as well.
Messages in SOAP can be transported by any mechanism, whether by socket or by hand. The
specification defines a transport binding for HTTP, which does not stray far from the general mechanisms
for XML transfer over HTTP. SOAP adds one twist, the SOAPAction
header, to help servers route SOAP messages without needing to examine their contents.
The last area of SOAP we focused on is remote procedure calls, or RPC. SOAP messages can be used to perform remote procedure calls, and the Specification defines how calls and returns should be serialized in messages. RPC is just one convention for SOAP messages, and we saw how the future of SOAP might be in other XML document conventions.
[previous] |
Created: November 26, 2001
Revised: November 26, 2001
URL: https://webreference.com/authoring/languages/xml/webservices/chap3/3/5.html