一个例子
比如说,通过将这个 SOAP 文档作为 Web 请求发送,可以向 Google Web 服务提出请求。(如清单 2 所示)
清单 2. 通过发送 SOAP 文档向 Google Web 服务提出请求
以下为引用的内容: xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"> "http://schemas.xmlsoap.org/soap/encoding/"> death star trash compactor |
此处我们可以看到 SOAP 信封(envelope),它是 Web 服务引擎能够理解的标准格式。这个消息的内容(在本例中为 doGoogleSearch 元素)被认作是 有效载荷(payload),由即将被 Web 服务处理的信息所组成。