Web Services
  Home arrow Web Services arrow Page 5 - Introducing the Implied Resource Pattern
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Introducing the Implied Resource Pattern
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 2
    2006-07-06

    Table of Contents:
  • Introducing the Implied Resource Pattern
  • Modeling Resource Properties
  • Resource Property Operations
  • GetResourceProperty
  • QueryResourceProperties
  • SetResourceProperties
  • Combining the SetResourceProperties Components

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Introducing the Implied Resource Pattern - QueryResourceProperties


    (Page 5 of 7 )

    The QueryResourceProperties operation was designed to allow applications to issue query expressions, like XPath, against the content of a WS-Resource's resource property document. Although the syntax of QueryResourceProperties allows for any type of query expression, the normal usage is for an XPath version 1.0 expression to be evaluated on the resource properties document. The form of the query element is

    <wsrp:QueryExpression dialect="URI">
    xsd:any
    </wsrp:QueryExpression>

    And the language used in the content of the query is indicated by the URI value of the dialect attribute. The WS-ResourceProperties specification defines two expression dialect URIs: XPath 1.0 (http://www.w3.org/TR/1999/REC-xpath-19991116) and XPath 2.0 (http://www.w3.org/TR/2003/WD-xpath20-20031112).

    Imagine if The Skateboard Warehouse had a collection of outstanding PurchaseOrder WS-Resources, some with SkatesTown and some with other vendors. Although it could group these WS-Resource references together into a collection (such as a ServiceGroup that we'll briefly discuss toward the end of this chapter), imagine for now that the reorder application simply keeps an array of WS-Resource endpoint references to these PurchaseOrder WS-Resources. Now, consider the case where a decision maker wants to get a list of all the pending PurchaseOrders. The application could iterate through the array of endpoint references, issuing the following XPath 1.0 Query:

    <soap:Envelope>
    ...
      <!--identify the resource from the EPR -->
    <poRP:POResourceID>XXXXX</poRP:POResourceID>
    </soap:Header> <soap:Body> <wsrp:QueryResourcePropertiesRequest> <wsrp:QueryExpression dialect="http://www.w3.org/TR/1999/
    REC-xpath-19991116"> ./poRP:status="pending"
    </wsrp:QueryExpression> </wsrp:GetMultipleResourcePropertiesRequest> </soap:Body> </soap:Envelope>

    The application would then aggregate the responses from the query evaluation on each PurchaseOrder WS-Resource. In the case of the PurchaseOrder we've been examining in this section, the status is received, not pending; therefore the response will be

    <soap:Envelope
    ...
     <poRP:POResourceID>43871</poRP:POResourceID>
    </soap:Header> <soap:Body> <wsrp:QueryResourcePropertiesResponse> false </wsrp:QueryResourcePropertiesResponse> </soap:Body> </soap:Envelope>

    Currently, there is no way for the Web service to communicate which query languages it supports. It would need to be declared using some WS-Policy assertion, but WS-ResourceProperties doesn't specify this WS-Policy grammar.

    More Web Services Articles
    More By Sams Publishing


       · This article is an excerpt from the book "Building Web Services with Java: Making...
     

    Buy this book now. This article is excerpted from chapter 8 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418). Check it out today at your favorite bookstore. Buy this book now.

    WEB SERVICES ARTICLES

    - Getting Started with Flex
    - Automated Billing and Faxing for the Web
    - An Introduction to Web Services
    - The Foundations of Web Services: From Novice...
    - Web Services Reengineering: Finishing Touches
    - Fault Handling with Web Services
    - Flow and Web Services
    - Process Lifecycles and Web Services
    - Business Processes and Web Services
    - Orchestrating Web Services
    - Notifications and Resources in the WS-Resour...
    - WS Notification and WS Topics in the WS Reso...
    - Introducing the Implied Resource Pattern
    - Web Services and Stateful Resources
    - Deploying an EJB Application






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT