<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
    主站蜘蛛池模板: 苍井空亚洲精品AA片在线播放| 67pao强力打造67194在线午夜亚洲| 亚洲熟妇少妇任你躁在线观看| 精品免费人成视频app| 亚洲情a成黄在线观看动漫尤物| 精品成人免费自拍视频| 亚洲激情在线观看| 18女人毛片水真多免费| 亚洲精品日韩专区silk| 久久精品亚洲综合专区| 13小箩利洗澡无码视频网站免费 | 亚洲精品午夜视频| 毛片免费全部播放无码| 亚洲av无码一区二区三区观看| 青青青国产在线观看免费网站| 亚洲一卡一卡二新区无人区| 国产一级高清视频免费看| 一级女性全黄久久生活片免费| 青娱乐免费在线视频| 亚洲国产精品无码第一区二区三区| 国产网站免费观看| aa级毛片毛片免费观看久| 亚洲一区二区影院| 免费观看的av毛片的网站| 成年大片免费视频播放一级| 亚洲国产精品无码一线岛国| 一本岛高清v不卡免费一三区| 亚洲欧美黑人猛交群| 国产精品亚洲综合专区片高清久久久| 亚洲综合中文字幕无线码| 免费永久看黄在线观看app| 中文字幕在线观看免费| 亚洲精品国产精品乱码不卡| 久草视频在线免费看| 亚洲国产乱码最新视频| 亚洲日韩小电影在线观看| 青青青国产在线观看免费网站 | 18女人腿打开无遮掩免费| 久久久久久亚洲精品无码| 亚洲视频免费在线看| 国产亚洲漂亮白嫩美女在线 |