欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SOAP Header 元素

可選的 SOAP Header 元素包含頭部信息。

SOAP Header 元素

可選的 SOAP Header 元素可包含有關(guān) SOAP 消息的應(yīng)用程序?qū)S眯畔ⅲū热缯J(rèn)證、支付等)。如果 Header 元素被提供,則它必須是 Envelope 元素的第一個(gè)子元素。

注釋:所有 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.dbjr.com.cn/transaction/"
soap:mustUnderstand="1">234</m:Trans>
</soap:Header>

...
...

</soap:Envelope>

上面的例子包含了一個(gè)帶有一個(gè) "Trans" 元素的頭部,它的值是 234,此元素的 "mustUnderstand" 屬性的值是 "1"。

SOAP 在默認(rèn)的命名空間中 ("http://www.w3.org/2001/12/soap-envelope") 定義了三個(gè)屬性。這三個(gè)屬性是:actor、 mustUnderstand 以及 encodingStyle。這些被定義在 SOAP 頭部的屬性可定義容器如何對(duì) SOAP 消息進(jìn)行處理。

actor 屬性

通過沿著消息路徑經(jīng)過不同的端點(diǎn),SOAP 消息可從某個(gè)發(fā)送者傳播到某個(gè)接收者。并非 SOAP 消息的所有部分均打算傳送到 SOAP 消息的最終端點(diǎn),不過,另一個(gè)方面,也許打算傳送給消息路徑上的一個(gè)或多個(gè)端點(diǎn)。

SOAP 的 actor 屬性可被用于將 Header 元素尋址到一個(gè)特定的端點(diǎn)。

語法

soap:actor="URI" 

實(shí)例

<?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.dbjr.com.cn/transaction/"
soap:actor="http://www.dbjr.com.cn/appml/">
234
</m:Trans>
</soap:Header>

...
...

</soap:Envelope>

mustUnderstand 屬性

SOAP 的 mustUnderstand 屬性可用于標(biāo)識(shí)標(biāo)題項(xiàng)對(duì)于要對(duì)其進(jìn)行處理的接收者來說是強(qiáng)制的還是可選的。

假如您向 Header 元素的某個(gè)子元素添加了 "mustUnderstand="1",則它可指示處理此頭部的接收者必須認(rèn)可此元素。假如此接收者無法認(rèn)可此元素,則在處理此頭部時(shí)必須失效。

語法

soap:mustUnderstand="0|1"

實(shí)例

<?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.dbjr.com.cn/transaction/"
soap:mustUnderstand="1">
234
</m:Trans>
</soap:Header>

...
...

</soap:Envelope>

encodingStyle 屬性

SOAP 的 encodingStyle 屬性在上一節(jié)中已解釋過了。