SOAP HTTP Binding
- Previous Page SOAP Fault
- Next Page SOAP Example
HTTP Protocol
HTTP communicates on top of TCP/IP. The HTTP client connects to the HTTP server using TCP. After establishing the connection, the client can send an HTTP request message to the server:
POST /item HTTP/1.1 Host: 189.123.345.239 Content-Type: text/plain Content-Length: 200
The server will process this request afterwards and then send an HTTP response to the client. This response includes a status code that can indicate the request status:
200 OK Content-Type: text/plain Content-Length: 200
In the above example, the server returned a 200 status code. This is the standard success code of HTTP.
If the server cannot decode the request, it may return information similar to this:
400 Bad Request Content-Length: 0
SOAP HTTP Binding
SOAP method refers to HTTP request/response that complies with SOAP encoding rules.
HTTP + XML = SOAP
SOAP requests can be HTTP POST or HTTP GET requests.
An HTTP POST request specifies at least two HTTP headers: Content-Type and Content-Length.
Content-Type
The Content-Type header of SOAP requests and responses can define the MIME type of the message and the character encoding used for the XML body of the request or response (optional).
Syntax
Content-Type: MIMEType; charset=character-encoding
Example
POST /item HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8
Content-Length
The Content-Length header of SOAP requests and responses specifies the number of bytes in the request or response body.
Syntax
Content-Length: bytes
Example
POST /item HTTP/1.1 Content-Type: application/soap+xml; charset=utf-8 Content-Length: 250
- Previous Page SOAP Fault
- Next Page SOAP Example