SOAP Envelope 元素
強制使用的SOAP 的Envelope 元素是SOAP 消息的根元素。
SOAP Envelope 元素
必需的SOAP 的Envelope 元素是SOAP 消息的根元素。 它可把XML 文檔定義為SOAP 消息。
實例
<?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"> ... Message information goes here ... </soap:Envelope>
xmlns:soap 命名空間
SOAP 消息必須擁有與命名空間"http://www.w3.org/2001/12/soap-envelope" 相關聯的一個Envelope 元素。
如果使用了不同的命名空間,應用程序會發生錯誤,並拋棄此消息。
encodingStyle 屬性
SOAP 的encodingStyle 屬性用於定義在文檔中使用的數據類型。 此屬性可出現在任何SOAP 元素中,並會被應用到元素的內容及元素的所有子元素上。
SOAP 消息沒有默認的編碼方式。
語法
soap:encodingStyle="URI"
實例
<?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"> ... Message information goes here ... </soap:Envelope>