SOAP TRANSPORT
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.
urn:xmethodsBabelFish#BabelFish
Even if the server does not require a full SOAPAction header, the client must specify an empty string ("">
or a null value. For example
SOAPAction: ""
SOAPAction:
Here is a sample request sent via HTTP to the XMethods Babelfish Translation service −
POST /perl/soaplite.cgi HTTP/1.0
Host: services.xmethods.com
Content-Type: text/xml; charset = utf-8
Content-Length: 538
SOAPAction: "urn:xmethodsBabelFish#BabelFish"
<?xml version = '1.0' encoding = 'UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns1:BabelFish
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>
</ns1:BabelFish>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
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.