<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-128  評論-55  文章-5  trackbacks-0
       WS-ResourceProperties協議

    WS-ResourceProperties協議解決了兩個問題:(1)如何描述資源狀態;(2)如何操作資源狀態。

    WSRP使用資源屬性文檔來描述資源的屬性,它是一個代表資源屬性元素邏輯組合的XML文檔。資源屬性文檔是資源狀態的一個映射,并與WSDLportType相關聯。同時WSRP還定義了一系列的消息交換格式,用于操作資源的狀態:如獲取、插入和修改屬性等。

    協議中的定義如下:

    Resource Property:

    l        A resource property is a piece of information defined as part of the state model of a WS-Resource.

    l        A resource property may reflect a part of the resource’s state, meta-data, manageability information, etc.

    Resource Properties Document:

    l        The XML document representing a logical composition of resource property elements. The resource properties document defines a particular view or projection of the state data implemented by the WS-Resource.

    l        The type (e.g. the XML Schema definition of the root element) of a resource properties document is associated with the WSDL portType defining the Web service interface. This association is the basis of the WS-Resource definition. Each instance of a particular WS-Resource type MUST implement a logical resource properties document of the type declared in the WSDL portType.

    Resource Property Element:

    l        The XML representation of a resource property.

    l        A resource property element must appear as the immediate child of the root element of a resource properties document.

    l        A resource property element must be an XML global element definition (GED), and is uniquely identified by QName.

    Resource Property Value:

    l        The value(s) associated with a resource property.

     

    WS-ResourceProperties協議還定義了9種標準操作:

    1.      GetResourcePropertyDocument

    2.      GetResourceProperty

    3.      GetMultipleResourceProperties

    4.      QueryResourceProperties

    5.      PutResourcePropertyDocument

    6.      SetResourceProperties

    7.      UpdateResourceProperties

    8.      DeleteResourceProperties

    9.      InsertResourceProperties

    一個包含資源屬性文檔的Web服務必須支持GetResourceProperty消息交換方式,可以支持其它8種消息交換模式。

    注意在協議中并沒有定義創建資源的操作,該操作由應用程序自己定義。

    關于創建 WS-Resource 的實際 SOAP 請求是非常簡單的:

    <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

        <SOAP-ENV:Header/>

        <SOAP-ENV:Body>

            <createSatellite xmlns="http://example.com/satellite"/>

        </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>

    我們還沒有實際的對象,所以該請求到達 WSDL 文件中列出的 URI,并且我們將該請求定義為一個簡單的 createSatellite 元素。

    響應要稍微有意思一些。一旦您發送針對新人造衛星的請求,服務器就創建一個對新WS-Resource的引用,并以EndpointReference形式將它返回:

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

        <SOAP-ENV:Header/>

        <SOAP-ENV:Body>

           <wsa:EndpointReference  xmlns:wsa="http://www.w3.org/2005/02/addressing"

                 xmlns:sat="http://example.org/satelliteSystem">

               <wsa:Address>http://example.com/satellite</wsa:Address>

               <wsa:ReferenceProperties>

                   <sat:SatelliteId>SAT9928</sat:SatelliteId>

               </wsa:ReferenceProperties>

           </wsa:EndpointReference>

        </SOAP-ENV:Body>

    </SOAP-ENV:Envelope>

    注意,EndpointReference Address 元素指向我們在 WSDL 文件中列出的同一 URI,所以信息仍然到達相同的地方,只是量的增多。

    現在我們應該注意,這不是一個普通的端點引用。 ReferenceProperties 元素展示一個標識符,該標識符最終將用于識別 WS-Resource,所以這實際上是一個 WS-Resource 限定的端點引用。我們可以使用該信息來對WS-Resource做出后續調用。

    已經創建了 WS-Resource,那么我們可以對它做什么呢?

    實際上,可以通過調整它的屬性來做任何事情。例如,可以通過更改 altitude 屬性來改變人造衛星軌道的大小。不,只是更改值并不能移動人造衛星;人造衛星的實際移動是由 Web 服務背后的應用程序決定的。但是這是 WS-Resources 所真正關心的:創建一種方式,以便通過更改屬性來操縱對象。協議只是指出了如何將這些更改告訴Web服務。它不關心應用程序是如何真正操縱對象的,我們也不關心。



    Author: orangelizq
    email: orangelizq@163.com

    歡迎大家訪問我的個人網站 萌萌的IT人
    posted on 2009-07-19 15:43 桔子汁 閱讀(1196) 評論(0)  編輯  收藏 所屬分類: Web Service
    主站蜘蛛池模板: 99麻豆久久久国产精品免费| 亚洲成熟丰满熟妇高潮XXXXX| 中文字幕在线免费看| 日本媚薬痉挛在线观看免费| 亚洲影院天堂中文av色| 97性无码区免费| 亚洲日韩AV一区二区三区四区| 一二三四免费观看在线电影| 亚洲最大的成人网站| 全免费a级毛片免费看不卡| 丰满亚洲大尺度无码无码专线| 在线观看免费国产视频| 免费看又黄又爽又猛的视频软件| 免费在线黄色网址| 久久久免费观成人影院| 午夜影视日本亚洲欧洲精品一区| 无码专区AAAAAA免费视频| 亚洲男女性高爱潮网站| 成人片黄网站A毛片免费| 亚洲AV成人无码久久WWW| 亚洲午夜爱爱香蕉片| 久久久国产精品福利免费| 久久久久久亚洲AV无码专区| 动漫黄网站免费永久在线观看| www亚洲精品久久久乳| 亚洲人成人无码网www电影首页| 一级毛片免费毛片一级毛片免费 | 色在线亚洲视频www| 午夜视频免费成人| selaoban在线视频免费精品| 亚洲国产精品无码专区| 91手机看片国产永久免费| 激情婷婷成人亚洲综合| 国产亚洲综合成人91精品| 午夜福利不卡片在线播放免费| 国产亚洲精彩视频| 亚洲av无码一区二区三区不卡| 最近中文字幕mv免费高清视频7| 一级免费黄色大片| 精品日韩99亚洲的在线发布| 国产精品另类激情久久久免费|