Home > Articles > Web Services > XML

Introduction to SOAP 1.1

  • Print
  • + Share This
This chapter is from the book

The Simple Object Access Protocol (SOAP) is an XML messaging specification that describes a message format along with a set of serialization rules for datatypes including structured types and arrays. In addition, it describes how to use the Hypertext Transfer Protocol (HTTP) as a transport for such messages. SOAP messages are effectively service requests sent to some end point on a network. That end point may be implemented in any number of ways—Remote Protocol Call (RPC) server, Component Object Model (COM) object, Java servlet, Perl script—and may be running on any platform. Thus, SOAP is about interoperability between applications running on potentially disparate platforms using various implementation technologies in various programming languages.

10.1 Introduction to SOAP messages

SOAP messages are transmitted between applications and may pass through a number of intermediaries as they travel from the initial sender to the ultimate recipient. SOAP messages are comprised of an Envelope element, with an optional Header and a mandatory Body child element. All three elements are in the namespace http://schemas.xmlsoap.org/soap/envelope/. The Envelope identifies the XML as being a SOAP message and must be the root element of the message. The Body element contains the message payload. The Header element provides an extension hook that allows SOAP to be extended in arbitrary ways. The following sections describe these elements, attributes that SOAP defines, the data encoding rules SOAP specifies, and the HTTP binding.

ExampleSkeleton SOAP message

  <!-- extensions go here -->
  <!-- message payload goes here -->
  • + Share This
  • 🔖 Save To Your Account