SOAP Body Element
The mandatory SOAP Body element contains the actual SOAP
message.
The SOAP Body Element
The required SOAP Body element contains the actual SOAP message intended for
the ultimate endpoint of the message.
Immediate child elements of the SOAP Body element may be namespace-qualified. SOAP defines
one element inside the Body element in the default namespace
("http://www.w3.org/2001/12/soap-envelope"). This is the SOAP Fault element, which
is used to indicate error messages.
<?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 example above requests the price of apples. Note that the m:GetPrice and
the Item elements above are
application-specific elements. They are not a part of the SOAP standard.
A SOAP response could 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>
|
Use a web development platform that will help you save a lot of time and bring excitement to your daily development work.
It will also create professional best-practices around your code development and team collaboration.
Try Springloops now, the web development platform
 |
|
Get Your Diploma!
W3Schools' Online Certification Program is the perfect solution for busy
professionals who need to balance work, family, and career building.
The HTML Certificate is for developers who want to document their knowledge of HTML, XHTML, and CSS.
The ASP Certificate is for developers who want to document their knowledge of ASP, SQL, and ADO.
|
|