欢迎光临
我们一直在努力

SOAP学习笔记(1)-.NET教程,Asp.Net开发

建站超值云服务器,限时71元/月

一       soap roles and soap nodes

soap node

the embodiment of the processing logic necessary to transmit, receive, process and/or relay a soap message, according to the set of conventions defined by this recommendation. a soap node is responsible for enforcing the rules that govern the exchange of soap messages (see 2. soap processing model). it accesses the services provided by the underlying protocols through one or more soap bindings.

soap role

a soap receivers expected function in processing a message. a soap receiver can act in multiple roles.

【理解】

soap node是一个实际存在的节点,该节点可以处理soap消息,soap node是一种物理上的概念;soap role是处理soap消息时,soap node所扮演的角色,是一个逻辑上的概念。一个soap node可以扮演多个soap role,一个soap role也可以由多个soap node所扮演。

 

二       预定义的soap role

short-name

name

description

next

"http://www.w3.org/2003/05/soap-envelope/role/next"

each soap intermediary and the ultimate soap receiver must act in this role.

none

"http://www.w3.org/2003/05/soap-envelope/role/none"

soap nodes must not act in this role.

ultimatereceiver

"http://www.w3.org/2003/05/soap-envelope/role/ultimatereceiver"

the ultimate receiver must act in this role.

 

三       处理soap消息的过程

1.      determine the set of roles in which the node is to act. the contents of the soap envelope, including any soap header blocks and the soap body, may be inspected in making such determination.

2.      identify all header blocks targeted at the node that are mandatory.

3.      if one or more of the soap header blocks identified in the preceding step are not understood by the node then generate a single soap fault with the value of code set to "env:mustunderstand" (see 5.4.8 soap mustunderstand faults). if such a fault is generated, any further processing must not be done. faults relating to the contents of the soap body must not be generated in this step.

4.      process all mandatory soap header blocks targeted at the node and, in the case of an ultimate soap receiver, the soap body. a soap node may also choose to process non-mandatory soap header blocks targeted at it.

5.      in the case of a soap intermediary, and where the soap message exchange pattern and results of processing (e.g. no fault generated) require that the soap message be sent further along the soap message path, relay the message as described in section 2.7 relaying soap messages.

 

四       relaying soap messages (relayable soap header blocks)

role

header block

short-name

assumed

understood & processed

forwarded

next

yes

yes

no, unless reinserted

no

no, unless relay ="true"

user-defined

yes

yes

no, unless reinserted

no

no, unless relay ="true"

no

n/a

yes

ultimatereceiver

yes

yes

n/a

no

n/a

none

no

n/a

yes

【理解】

所谓relaying soap message(soap消息重放)仅是在soap node处理一个header block,但却因为不能理解该header block(can’t understand)而忽略该header block时才有意义,(这个header block没有设置mustunderstand为true,否则无法理解时应返回一个soap fault,而不是继续向前传递soap消息,这时也没有relay的意义)。这时若header block的relay属性为true,则soap node必须将该header block保留在soap消息中,并向前转发给下一个soap node。

总结来说,soap消息重放仅对soap中间节点(soap intermediary)有意义,并且仅当该中间节点无法处理一个需由它处理但又未设置mustunderstand属性为true的header block时有意义,该header block将被保留在soap消息中,并向前转发给下一个soap node。

 

五       soap中间节点生成的soap消息

soap中间节点必须按照第三部分所描述的方式处理其收到的soap消息,并按以下方式生成一个新的soap消息,并将其向前传递给下一个soap node。
remove all processed soap header blocks.

remove all non-relayable soap header blocks that were targeted at the forwarding node but ignored during processing.

retain all relayable soap header blocks that were targeted at the forwarding node but ignored during processing.

insert or reinsert some header blocks if the soap intermediary determined to do that. the header blocks that were inserted or reinserted might be indistinguishable from one or more of the header blocks removed by the intermediary. processing is defined here in terms of re-inserting header blocks (rather than leaving them in place) to emphasize the need to process them at each soap node along the soap message path.

 

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » SOAP学习笔记(1)-.NET教程,Asp.Net开发
分享到: 更多 (0)