当前位置: 首页 > 网络学院 > XML相关教程 > SOAP > SOAP 实例
In the example below, a GetStockPrice request is sent to a server. The request has a StockName parameter, and a Price parameter will be returned in the response. The namespace for the function is defined in "http://www.example.org/stock" address.
在下面的例子中,一个 GetStockPrice 请求被发送到了服务器。此请求有一个 StockName 参数,而在响应中则会返回一个 Price 参数。此功能的命名空间被定义在此地址中: "http://www.example.org/stock"
The SOAP request:
SOAP请求:
POST /InStock HTTP/1.1 <soap:Body xmlns:m="http://www.example.org/stock"> </soap:Envelope> |
A SOAP response:
SOAP响应:
HTTP/1.1 200 OK <?xml version="1.0"?> <soap:Body xmlns:m="http://www.example.org/stock"> </soap:Envelope> |