SOAP Messages and WSDL
In this lesson, we will learn about the building blocks of SOAP messages and Web Service Definition Language (WSDL).
We'll cover the following...
The SOAP message
The SOAP message is an XML document which has the following components:
SOAP Message
-
An
Envelope
element that encapsulates the SOAP header and SOAP body, which form the SOAP message. This is the root of the SOAP message. It needs to have at least one SOAP body. -
A
SOAP Header
element that contains metadata about the message such as credentials that can be used for authentication. It consists of two attributes:- Actor – defines the list of services or nodes that should receive the SOAP message in the chain the message propagation defined by SOAP
- MustUnderstand – labels that tell whether the header is mandatory or optional. When this attribute is set, the service node that receives the SOAP message will process and validate its semantics
A
SOAP Header
can also have complex types that can be used in the SOAP body as mentioned like so:<?xml version="1.0"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://educative.io/soap-automation"> <soapenv:Header> <soap:requestId soapenv:mustUnderstand="true">dc7e2763-6495</soap:requestId> </soapenv:Header> <soapenv:Body> .............. </soapenv:Body> </soapenv:Envelope>
-
A
SOAP Body
contains the information about the request and response. ThecomplexType
...