Latest web development tutorials

SOAP Syntax

SOAP Building Blocks

A SOAP message is an ordinary XML document containing the following elements:

  • Envelope required elements, the XML document can be identified as a SOAP message
  • Optional Header element that contains header information
  • Body required elements, including all the calls and responses
  • Optional Fault element provides information about the process this error message information

All of the above elements are declared in default namespace for the SOAP envelope in:

And namespace for SOAP encoding and data types by default:

Syntax Rules

Here are some important syntax rules:

  • SOAP message must be encoded in XML
  • SOAP message must use the SOAP Envelope namespace
  • SOAP message must use the SOAP Encoding namespace
  • SOAP message must not contain a DTD reference
  • SOAP message can not contain XML processing instructions

The basic structure of a SOAP message

<?xml version="1.0"?>