About this format
SOAP relies entirely on XML to structure messages. Every message is packed inside a SOAP Envelope containing a Body and optional Header.
Example Data
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Header>
<m:Trans xmlns:m="http://example.org/transaction">
234
</m:Trans>
</env:Header>
<env:Body>
<m:GetPrice xmlns:m="http://example.org/inventory">
<m:Item>Apples</m:Item>
</m:GetPrice>
</env:Body>
</env:Envelope>When to use SOAP Envelope
- Communicating with legacy enterprise APIs
- Handling strict contract-based messaging
- Executing remote procedure calls