For example, to access the AltaVista BabelFish Translation service, hosted by XMethods, you must specify the following as a SOAPAction header.
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:
Note the content type and the SOAPAction header. Also note that the BabelFish method requires two String parameters. The translation mode en_fr will translate from English to French.
SOAP responses delivered via HTTP are required to follow the same HTTP status codes. For example, a status code of 200 OK indicates a successful response. A status code of 500 Internal Server Error indicates that there is a server error and that the SOAP response includes a Fault element. |
SOAP HTTP Binding
A SOAP method is an HTTP request/response that complies with the SOAP encoding rules.
HTTP + XML = SOAP
A SOAP request could be an HTTP POST or an HTTP GET request.
The HTTP POST request specifies at least two HTTP headers: Content-Type and Content-Length.
Content-Type
The Content-Type header for a SOAP request and response defines the MIME type for the message and the character encoding (optional) used for the XML body of the request or response.
Syntax
Example
Content-Type: application/soap+xml; charset=utf-8
Content-Length
The Content-Length header for a SOAP request and response specifies the number of bytes in the body of the request or response.
Syntax
Example
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 250
References
Wikipedia for SOAP