- WS-Collaboration
- WS-Addressing
- WS-Reliability and WS-Reliable Messaging
- WS-Security
PS : 並非每一個spec 都一定要在你實作SOA服務中都用上,端看你真實的需要,還有你的預算:D Message Exchange PatternsSOAP message的交換可以是 同步/非同步模式,整體(collectively)的看這些多樣的訊息傳遞模式可以用一個term來統稱 -- Message Exchange Patterns( MEPs ),在我們進到2nd gen~ web service之前,先重溫(revisit)一下訊息傳遞的幾種方式:
- Request-Response
- Solicit-Response
- One-Way
- Notification
在新版本的WSDL 2.0 spec當中,支援了八種不同的MEPs
- In-Out pattern - Equivalent to the Request-Response
- Out-In pattern - Equivalent to Solicit-Response
- In-Only pattern - Equivalent to One-Way or the Push technology of traditional MEP
- Out-Only pattern - Equivalent to Notification of traditional MEP
- Robust In-Only pattern - 進階版的 In-Only ,在訊息提交的過程中若發生了錯誤,可以進行error handle以及訊息回應
- Robust Out-Only pattern - 進階版的 Out-Only ,在訊息提交的過程中若發生了錯誤,可以進行error handle以及訊息回應
- In-Optional-Out pattern - 更進階版的In-Out MEP,response在整個訊息傳遞過程是optional,同時也支援error handle
- Out-Optional-In pattern - 更進階版的 Out-In MEP,request 在整個訊息傳遞過程是optional,同時也支援error handle
WS-* -- The New Generation
- WS-Addressing
最一開始,WS-Addressing這個spec事由IBM / Micorsoft / BEA / Sun / SAP 定義出來的,目前已經成為了W3C的標準之一,這個規範提供了web service 能夠對 服務位址進行溝通傳遞,這基本上包含了兩個部分
- Structure for communicating a reference to a web service endpoint
- A set of Message Addressing Properties - 通常會與要傳遞的訊息主體有關
- WS-Atomic Transaction
定義出這個protocol是為了可達成分散式交易的process,使其可被使用成為 WS-Coordination的一部分。
- WS-Coordination
Coordination顧名思義是要進行協同合作,使得一個因業務需要的完整bp可以被正常執行,這是一個完整的framework,其中包括了有 WS-Atomic Transaction , WS-Business Activity, WS-BPEL。
- WS-Eventing
Eventing主要是專注於 addressing reqirements時採用 Pub/Sub web service架構的事件處理,通知每個訂閱者當web service 準備進行執行 或者已完成的事件。
- WS-Metadata Exchange
The specification enables the requester to send a standarized message requesting some or all information regarding the web service being consumed.
- WS-Notification
解決發送訊息時使用 pub/sub web service 架構的通知作業
- WS-Policy Framework
包含了 WS-Policy / WS-Policy Attachments / WS-Policy Assertion
- WS-Reliability / WS-Reliable Messaging
- WS-Security
WS - * -- A Working Definition這裡先記錄一些在2nd gen~ web service常用到的spec 在使用上的概念與說明
- Addressing
定址,在兩個application之間要進行溝通時,我們總會希望這整個溝通傳遞過程是處在一個可被信賴的以及安全的環境下來進行,而這樣的溝通過程通常會伴隨著一連串的交易,WS-Addressing spec 就是企圖要去尋找這整個溝通的過程的目的位址資訊,所以整個addressing 總會包括了有 Source of Message / Dest of Message / Routing details of Message / Instructions for what needs to be done in case of faults and nondelivery and so on ...
WS-Addressing將這樣的需求實作,放在 SOAP header裏頭,詳細的tag 參考W3C規範(目前最新版本是SOAP 1.2),WS-Addressing spec 定義了兩種不同type的 SOAP Headers如下:
- Message Addressin Properties
這種類型的SOAP header,位址資訊可以包括有標準的header entries --> destination, source endpoint, reply endpoint, fault endpoint, message ID, relationship, action
- Endpoint References (EPR)
EPR類型的 header 封裝了位址資訊,可使用的entry 包括有 --> address, reference properties, reference parameters, service port, port type, policy
[caption id="attachment_588" align="alignnone" width="483"]
- Reliability and Reliable Messaging
在訊息的傳遞方式中web service提供了同步與非同步模式,而一旦我們使用的是非同步模式時,會要考量到幾件事情:
- 確切的將訊息送達至目標系統
- 檢查是否有傳遞失敗的狀況
- 對於訊息傳遞的順序性與優先權的設置是否真的如預期的進行完整傳送
如果訊息無法被傳遞的話,系統將會產出一個你所設置預期的錯誤訊息,並記錄你錯漏的這個message。
[caption id="attachment_590" align="alignnone" width="534"]
- Security
沒有留言:
張貼留言