HTTP 可以提供各種服務 - HTML, images, sound, video, etc.
SOAP 是在 HTTP 上面, 專門提供 XML 傳送的服務.
SOAP 的request 如下,HTTP headers在上面, SOAP message 在下面:
--------- HTTP portion of the message ------
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
--------- SOAP portion of the message ------
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
reference:
Difference between SOAP and HTTP protocol <Link>
SOAP 是在 HTTP 上面, 專門提供 XML 傳送的服務.
SOAP 的request 如下,HTTP headers在上面, SOAP message 在下面:
--------- HTTP portion of the message ------
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn
--------- SOAP portion of the message ------
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
<soap:Body xmlns:m="http://www.example.org/stock">
<m:GetStockPrice>
<m:StockName>IBM</m:StockName>
</m:GetStockPrice>
</soap:Body>
</soap:Envelope>
reference:
Difference between SOAP and HTTP protocol <Link>
沒有留言:
張貼留言