标题:SOAP第4课:SOAP Header 元素
作者:网友
日期:2020-12-12 13:51:17
内容:
可选的 SOAP Header 元素包含头部信息。
SOAP Header 元素
可选的 SOAP Header 元素可包含有关 SOAP 消息的应用程序专用信息(比如认证、支付等)。如果 Header 元素被提供,则它必须是 Envelope 元素的第一个子元素。
注释:所有 Header 元素的直接子元素必须是合格的命名空间。
<?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"> <soap:Header> <m:Trans xmlns:m="http://www.w3school.com.cn/transaction/" soap:mustUnderstand="1">234</m:Trans> </soap:Header> ... ... </soap:Envelope> |
soap:actor="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"> <soap:Header> <m:Trans xmlns:m="http://www.w3school.com.cn/transaction/" soap:actor="http://www.w3school.com.cn/appml/"> 234 </m:Trans> </soap:Header> ... ... </soap:Envelope> |
soap:mustUnderstand="0|1" |
<?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"> <soap:Header> <m:Trans xmlns:m="http://www.w3school.com.cn/transaction/" soap:mustUnderstand="1"> 234 </m:Trans> </soap:Header> ... ... </soap:Envelope> |