一 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 receiver's 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 Fa