SOAP Getting St...login
SOAP Getting Started Tutorial
author:php.cn  update time:2022-04-11 14:22:12

SOAP HTTP Bingding



HTTP Protocol

HTTP communicates on top of TCP/IP. HTTP clients use TCP to connect to HTTP servers. After the connection is established, the client can send an HTTP request message to the server:

POST /item HTTP/1.1
Host: 189.123.255.239
Content-Type: text/plain
Content-Length: 200

The server will then process the request and send an HTTP response to the client. This response contains a status code that indicates the status of the request:

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 for HTTP.

If the server cannot decode the request, it may return information similar to this:

400 Bad Request
Content-Length: 0


SOAP HTTP Binding

The SOAP method refers to HTTP request/response that adheres to SOAP encoding rules.

HTTP + XML = SOAP

SOAP requests may be HTTP POST or HTTP GET requests.

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 defines the MIME type of the message, and the optional character encoding used for the XML body of the request or response. ).

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 the SOAP request and response specifies the request or The number of bytes in the response body.

Grammar

Content-Length: bytes

Example

POST /item HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 250

php.cn