SOAP Body element
Mandatory SOAP Body
element contains the actual SOAP message.
SOAP Body element
Required SOAP Body
element can contain the actual SOAP message that is intended to be delivered to the final endpoint of the message.
SOAP Body
the immediate child element of an element can be a qualified namespace.
Example
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body>
<m:GetPrice xmlns:m="http://www.w3schools.com/prices">
<m:Item>Apples</m:Item>
</m:GetPrice>
</soap:Body>
</soap:Envelope>
The above example asks for the price of Apple. Please note that the above m:GetPrice
and Item
elements are application-specific elements. They are not part of the SOAP standard.
A SOAP response should look something like this:
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body>
<m:GetPriceResponse xmlns:m="http://www.w3schools.com/prices">
<m:Price>1.90</m:Price>
</m:GetPriceResponse>
</soap:Body>
</soap:Envelope>