Soap - EnvelopeThe SOAP envelope indicates the start and the end of the message so that the receiver knows when an entire message has been received. The SOAP envelope solves the problem of knowing when you are done receiving a message and are ready to process it. The SOAP envelope is therefore basically a packaging mechanism. Points to Note
Given below is an example of v1.2-compliant SOAP message.
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope" SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </SOAP-ENV:Envelope> SOAP with HTTP POST The following example illustrates the use of a SOAP message within an HTTP POST operation, which sends the message to the server. It shows the namespaces for the envelope schema definition and for the schema definition of the encoding rules. The OrderEntry reference in the HTTP header is the name of the program to be invoked at the tutorialspoint.com website.
POST /OrderEntry HTTP/1.1
Host: www.tutorialspoint.com Content-Type: application/soap; charset="utf-8" Content-Length: nnnn <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2001/12/soap-envelope" SOAP-ENV:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> ... Message information goes here ... </SOAP-ENV:Envelope> NOTE: The HTTP binding specifies the location of the service. |