SOAP HTTP Binding

 SOAP HTTP Binding

作者:w3pop.com 翻译/整理:w3pop.com
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>

The HTTP Protocol

HTTP communicates over TCP/IP. An HTTP client connects to an HTTP server using TCP. After establishing a connection, the client can send an HTTP request message to the server:
HTTP是通过TCP/IP进行通讯的。 HTTP客户端通过TCP协议连接到HTTP服务器。在建立连接之后,客户端就可以向服务器发送HTTP请求信息了。

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

The server then processes the request and sends an HTTP response back to the client. The response contains a status code that indicates the status of the request:
服务器会处理请求并通过HTTP来响应客户端。响应包含有指明请求者状态的状态代码。

200 OK
Content-Type: text/plain
Content-Length: 200

In the example above, the server returned a status code of 200. This is the standard success code for HTTP.
在下面这个例子中,服务器会返回一个200的状态代码。这是HTTP的标准成功代码。

If the server could not decode the request, it could have returned something like this:
如果服务器不能破解请求代码,那它就会如下返回:

400 Bad Request
Content-Length: 0


SOAP HTTP Binding
SOAP HTTP捆绑

A SOAP method is an HTTP request/response that complies with the SOAP encoding rules.
SOAP方式是一个遵照SOAP编码规则的HTTP请求/响应。

HTTP + XML = SOAP

A SOAP request could be an HTTP POST or an HTTP GET request.
SOAP请求是HTTP POST 或 HTTP GET请求。

The HTTP POST request specifies at least two HTTP headers: Content-Type and Content-Length.
HTTP POST请求详细说明了最少2个HTTP标题(HTTP header) :Content-Type (内容类型)和 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.
SOAP请求和响应的内容长度标题定义了用于请求或响应的XML主要部分的信息和字符编码(可选择的)的MIME类型 。

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 for a SOAP request and response specifies the number of bytes in the body of the request or response.
SOAP请求和响应的内容长度标题详细说明了请求和响应的主体部分的字节数。

Syntax
语法
Content-Length: bytes
Example
实例
POST /item HTTP/1.1
Content-Type: application/soap+xml; charset=utf-8
Content-Length: 250
<script type="text/javascript"> </script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>
 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值