Home arrow Web Services arrow Page 5 - Notifications and Resources in the WS-Resource Framework
WEB SERVICES

Notifications and Resources in the WS-Resource Framework


This article concludes our discussion of the WS-Resource Framework, a set of proposed standards that formalizes the relationship between Web services and state. In this part, we finish covering notifications and go into greater detail about resources. It 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).

Author Info:
By: Sams Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 4
July 20, 2006
TABLE OF CONTENTS:
  1. · Notifications and Resources in the WS-Resource Framework
  2. · Notification Consumers
  3. · Resource Lifetime
  4. · Initializing Termination Time
  5. · Notification of WS-Resource Termination
  6. · Other WS-Resource Framework Specifications

print this article
SEARCH DEVARTICLES

Notifications and Resources in the WS-Resource Framework - Notification of WS-Resource Termination
(Page 5 of 6 )

WS-ResourceLifetime also standardizes the way WS-Notification can be used to inform interested parties about the termination of a WS-Resource. There is a standardized topic (recall the topics concept we discussed in the section "Topics") in the WS-ResourceLifetime namespace ResourceTermination. Requestors can use this topic to subscribe for a notification message when a WS-Resource of interest is terminated.

In order for this facility to work, the following pieces must be in place:

  • The Web service component of the WS-Resource must support the notification producer operations (for example, the subscribe operation).

  • The Web service component of the WS-Resource must include the wsrl:ResourceTermination topic in its list of topics (recall the Topics resource property described in the section "Resource Properties of a Notification Producer").

SkatesTown's POPortType Web service supports generating the notification messages on the ResourceTermination topic as described earlier. The Skateboard Warehouse can issue a subscribe operation as follows to register interest in when a PurchaseOrder WS-Resource is destroyed:

<soap:Envelope
...
<soap:Header>
...
<!-- the reference property to id the PO -->
<poRP:POResourceID>43871</poRP:POResourceID>
</soap:Header>
<soap:Body>
<wsnt:Subscribe>
<wsnt:ConsumerReference>
<wsa:Address>
http://www.skateboardwarehouse.com
/services/inventoryManagement </wsa:Address> </wsnt:ConsumerReference> <wsnt:TopicExpression dialect= "http://www.ibm.com/xmlns/stdwip/web-
services/WS-Topics/TopicExpression/
simple"> wsrl:ResourceTermination </wsnt:TopicPathExpression> ...
</wsnt: Subscribe> </soap:Body> </soap:Envelope>

When the PurchaseOrder WS-Resource is terminated, a notification message will be delivered to the notification consumer indicating (among other information) the time the WS-Resource was terminated and the reason for its termination. WS-ResourceLifetime specifies that the notification message must contain an element of the following form:

<wsrl:TerminationNotification>
<wsrl:TerminationTime>xsd:dateTime</wsrl:
TerminationTime> <wsrl:TerminationReason>xsd:any</wsrl:
TerminationReason>? </wsrl:TerminationNotification>


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- 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

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials