SOAP學習筆記(1)

來源:互聯網
上載者:User
筆記
一       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 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.



 



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.