<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
    主站蜘蛛池模板: 亚洲同性男gay网站在线观看| 亚洲国模精品一区| 亚洲免费观看在线视频| 9420免费高清在线视频| 91精品国产免费久久国语蜜臀 | 亚洲中文字幕无码久久| 亚洲高清视频在线| 亚洲精品无码你懂的| 亚洲av色香蕉一区二区三区蜜桃| 亚洲av无码专区首页| 精品免费AV一区二区三区| 污污的视频在线免费观看| 国产福利免费视频 | 中文在线观看免费网站| a国产成人免费视频| 无码A级毛片免费视频内谢| 最近中文字幕国语免费完整| 无码av免费毛片一区二区| 国外成人免费高清激情视频| 国产免费久久精品久久久| 久久亚洲高清综合| 亚洲AV无码一区二区二三区软件 | 亚洲综合av永久无码精品一区二区| 91麻豆国产自产在线观看亚洲| 久久精品国产亚洲av麻豆 | 4338×亚洲全国最大色成网站| 国产亚洲精品国产| 亚洲综合激情另类小说区| 中文字幕亚洲精品无码| 羞羞视频免费观看| 91在线免费观看| 99re6热视频精品免费观看| 免费99精品国产自在现线| 日韩a级毛片免费视频| 国产午夜亚洲精品午夜鲁丝片| 亚洲国产成人久久综合碰碰动漫3d | 亚洲精品网站在线观看不卡无广告| 亚洲精品国产品国语在线 | 亚洲中文字幕伊人久久无码| 亚洲2022国产成人精品无码区| 久久精品国产亚洲av麻豆蜜芽|