Soap isn't always tied to any shipping protocol. Soap may be transported through SMTP, FTP, IBM's MQSeries, or Microsoft Message Queuing (MSMQ>
. Cleaning soap specification consists of info on HTTP most effective. HTTP remains the maximum famous soap transport protocol.
SOAP via HTTP
Quite logically, cleaning soap requests are despatched thru an HTTP request and cleaning soap responses are again in the content material of the HTTP reaction. Whilst cleaning soap requests may be despatched through an HTTP GET, the specification consists of details on HTTP post only.
Additionally, both HTTP requests and responses are required to set their content material kind to textual content/xml.
The soap specification mandates that the consumer have to offer a SOAPAction header, however the real cost of the SOAPAction header is depending on the cleaning soap server implementation.
Even if the server does not require a full SOAPAction header, the client must specify an empty string ("">
or a null value. For example
Here is a sample request sent via HTTP to the XMethods Babelfish Translation service −
POST /perl/soaplite.cgi HTTP/1.0
Content-Type: text/xml; charset = utf-8
<?xml version = '1.0' encoding = 'UTF-8'?>
xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/">
xmlns:ns1 = "urn:xmethodsBabelFish"
SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
<translationmode xsi:type = "xsd:string">en_fr</translationmode>
<sourcedata xsi:type = "xsd:string">Hello, world!</sourcedata>
Soap responses brought thru HTTP are required to observe the same HTTP fame codes. As an instance, a status code of two hundred good enough indicates a a hit response. A status code of 500 inner Server errors indicates that there's a server mistakes and that the cleaning soap reaction consists of a Fault detail.