Home arrow Web Services arrow Page 3 - WS Notification and WS Topics in the WS Resources Framework

WS Notification and WS Topics in the WS Resources Framework

This article continues our discussion of the WS-Resource Framework, a set of proposed standards that formalizes the relationship between Web services and state. In this part, the third of a multi-part series, we cover the use of notifications and topics. 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 / 6
July 13, 2006
  1. · WS Notification and WS Topics in the WS Resources Framework
  2. · Subscribing for Notification
  3. · The Subscription WS-Resource
  4. · Topics and Topic Spaces
  5. · TopicPathExpressions
  6. · Rounding Out the XML Model of Topics: aliasRef

print this article

WS Notification and WS Topics in the WS Resources Framework - The Subscription WS-Resource
(Page 3 of 6 )

WS-Notification models a subscription as a WS-Resource. The subscription is a stateful resource that is created by a subscribe request and that uses operations defined by WS-ResourceLifetime (see the section "Resource Lifetime") to manage the lifetime of the subscription.

The Subscription WS-Resource is associated with a Web service implementing the SubscriptionManager portType. This portType defines a collection of resource properties corresponding to the components in the subscribe request, allowing the requestor to use WS-ResourceProperties operations to read and write the values of subscription-related resource properties. This portType also defines a creationTime resource property that records when the subscription was created.

The SubscriptionManager also supports operations defined by WS-ResourceLifetime, to give requestors the ability to terminate the resource. So, for example, if The Skateboard Warehouse was no longer interested in notifications associated with their PurchaseOrder WS-Resource, they could send a destroy operation to the SubscriptionManager (remembering to use the implied resource pattern to identify the subscription WS-Resource). Of course, the requestor may also use the time-based or scheduled termination mechanism specified by WS-ResourceLifetime to manage the lifetime of the subscription resource.

The complete collection of resource properties defined by a Subscription WS-Resource is as follows:

  • ConsumerReference—The EPR to the consumer that receives notification messages associated with this subscription.

  • TopicExpression—The expression that indicates the set of topics associated with this subscription.

  • UseNotify—Determines if the notification message is sent with additional meta-data.

  • Precondition—The precondition associated with the subscription.

  • Selector—The selector or filter associated with the subscription.

  • SubscriptionPolicy—The policies associated with the subscription.

  • CreationTime—The time the subscription was created.

  • CurrentTime, TerminationTime—Defined by WS-ResourceLifetime. These resource properties describe the lifetime of a subscription.

Note that most of the values of these resource properties are derived from the subscribe request message. A requestor would use operations defined by WS-ResourceProperties (included as part of the SubscriptionManager portType) to read and write the values of these resource properties.

The SubscriptionManager portType also defines a pauseSubscription operation and a resumeSubscription operation. These operations work to stop and restart the process of sending notification messages to the notification consumer based on this subscription. If a requestor wishes to temporarily halt the sending of notification messages based on this subscription, it sends a pauseSubscription request message to the SubscriptionManager Web service associated with the subscription. To resume sending messages, the requestor sends a resumeSubscription request.

blog comments powered by Disqus

- 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 

Developer Shed Affiliates


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