You can code a single application to undertake several WS-Notification tasks. These topics provide sample code for common tasks that your WS-Notification applications can perform.
Your applications can also use WS-Notification to receive event notifications generated by other clients of the service integration bus such as JMS clients. This is described in Topology for WS-Notification as an entry or exit point to the service integration bus and Providing access for WS-Notification applications to an existing bus topic space. For information about developing applications for a mixed clients solution, including cross-streaming from a JMS client, see Interacting with JMS message types.
A single application can be coded to undertake several WS-Notification tasks. Use the examples to help you code these tasks into your WS-Notification applications.
For an overview of how applications can use the notification broker, see WS-Notification: How client applications interact at runtime.
Rather than receiving all messages on a topic to which you have subscribed, your consuming application can use XML Path (XPath) selectors to filter the messages based upon the contents of each message as described in Filtering the message content of publications.
The code examples listed in this topic use the following WebSphere Application Server APIs and SPIs:
com.ibm.websphere.sib.wsn.AbsoluteOrRelativeTime; com.ibm.websphere.sib.wsn.CreatePullPoint; com.ibm.websphere.sib.wsn.CreatePullPointResponse; com.ibm.websphere.sib.wsn.Filter; com.ibm.websphere.sib.wsn.GetMessages; com.ibm.websphere.sib.wsn.GetMessagesResponse; com.ibm.websphere.sib.wsn.NotificationMessage; com.ibm.websphere.sib.wsn.TopicExpression; com.ibm.websphere.webservices.soap.IBMSOAPFactory; com.ibm.websphere.wsaddressing.EndpointReference; com.ibm.websphere.wsaddressing.WSAConstants; com.ibm.wsspi.wsaddressing.EndpointReferenceManager;
Write a Java EE application, containing a web service definition, that can be deployed to the application server and act as a NotificationProducer, NotificationConsumer or demand-based publisher.
Write a Java EE application that can be run outside of the application server to make web service invocations against an external web service. This application acts as a lightweight publisher, or a pull type consumer by invoking web service operations against another web service such as the NotificationBroker provided by WebSphere Application Server.
Rather than receiving all messages on a topic to which you have subscribed, your consuming application can use XML Path (XPath) selectors to filter the messages based upon the contents of each message. This content-based subscription gives you greater flexibility in defining the type of information that you want to receive, and your applications do not need to handle their own filtering. Performance is improved because messages that are not relevant are not sent unnecessarily from the server to the application.
Use this task to write the code for a JAX-RPC client acting in the publisher registration role, registering a publisher (producer) application with a broker, based on the example code extract provided.
Use this task to write the code for a JAX-RPC client acting in the subscriber role, pausing a subscription for a consumer application, based on the example code extract provided.
Use this task to write the code for a publisher client application that can publish a notification message to a broker, based on the example code extract provided.
Use this task to write the code for a JAX-RPC subscriber client. This client creates a pull point for use by consumer applications that use pull style notifications.
Use this task to write the code for a JAX-RPC client acting in the pull style consumer role, requesting messages from a pull point, based on the example code extract provided.
Use this task to write the code for a subscriber client application that can subscribe a consumer application with a broker, based on the example code extract provided.
Use this example when creating a web service that implements the NotificationConsumer portType defined by the Web Services Base Notification specification.
In this information ...Related concepts
Related tasks
Related reference
| IBM Redbooks, demos, education, and more(Index) |