欢迎访问服务器技术网-www.fuwuqijishu.com

SOAP 实例

SOAP fuwuqijishu 2年前 (2022-06-20) 271次浏览 0个评论 扫描二维码

SOAP 实例


一个 SOAP 实例

在下面的例子中,一个 GetStockPrice 请求被发送到了服务器。此请求有一个 StockName 参数,而在响应中则会返回一个 Price 参数。此功能的命名空间被定义在此地址中: “http://www.example.org/stock”

SOAP 请求:

POST /InStock HTTP/1.1
Host: http://www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?xml version=”1.0″?>
<soap:Envelope
xmlns:soap=”http://www.w3.org/2001/12/soap-envelope&#8221;
soap:encodingStyle=”http://www.w3.org/2001/12/soap-encoding”&gt;

<soap:Body xmlns:m=”http://www.example.org/stock”&gt;
  <m:GetStockPrice>
   
<m:StockName>IBM</m:StockName>
  </m:GetStockPrice>
</soap:Body>

</soap:Envelope>

SOAP 响应:

HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?xml version=”1.0″?>
<soap:Envelope
xmlns:soap=”http://www.w3.org/2001/12/soap-envelope&#8221;
soap:encodingStyle=”http://www.w3.org/2001/12/soap-encoding”&gt;

<soap:Body xmlns:m=”http://www.example.org/stock”&gt;
 
<m:GetStockPriceResponse>
   
<m:Price>34.5</m:Price>
 
</m:GetStockPriceResponse>
</soap:Body>

</soap:Envelope>

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

Warning: error_log(/www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/#log/log-2117.txt): failed to open stream: No such file or directory in /www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/spider.class.php on line 2900