SOAP 教程
強(qiáng)制使用的 SOAP 的 Envelope 元素是 SOAP 消息的根元素。
必需的 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>
SOAP 消息必須擁有與命名空間 "http://www.w3.org/2001/12/soap-envelope" 相關(guān)聯(lián)的一個(gè) Envelope 元素。
如果使用了不同的命名空間,應(yīng)用程序會發(fā)生錯(cuò)誤,并拋棄此消息。
SOAP 的 encodingStyle 屬性用于定義在文檔中使用的數(shù)據(jù)類型。此屬性可出現(xiàn)在任何 SOAP 元素中,并會被應(yīng)用到元素的內(nèi)容及元素的所有子元素上。
SOAP 消息沒有默認(rèn)的編碼方式。
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>