Sharing event notification messages with other bus client applications

How to create the JMS side of a mixed WS-Notification and JMS (bus) clients configuration, to enable cross-streaming of messages between WS-Notification applications and other clients of the service integration bus.

You can configure WS-Notification so that Web service applications receive event notifications generated by other clients of the service integration bus such as JMS clients. Similarly Web service applications can generate notifications to be received by other client types. This configuration is described in the Use pattern for WS-Notification as an entry or exit point to the service integration bus. You achieve this configuration by creating a permanent topic namespace that allows messages to be shared between Web service and non Web service clients of the bus, as described in Providing access for WS-Notification applications to an existing bus topic space.

Interacting with JMS message types

The WS-Notification service is responsible for both inserting messages into the service integration bus (in response to Notify operations received from Web services) and receiving messages from the bus (in order to pass messages to a Web service as a result of a Subscribe operation).

Messages inserted by the WS-Notification service are of the JMS BytesMessage type, so when a Web service invokes the Notify operation against a WS-Notification service point the application content of the message is inserted into the body of a JMS BytesMessage using the UTF-8 encoding.

For messages received by the WS-Notification service in response to a subscription the reverse conversion is applied. The received message is converted to the appropriate JMS message type. If the appropriate type is determined to be a BytesMessage type, then the body of the message is converted to a string using the UTF-8 encoding and proceeds through the code for checking before being sent to the requesting Web service.

If the converted BytesMessage string does not contain an XML element when converted to a string then this message is ignored as having been originated by a non WS-Notification aware (JMS) application.

If the received message is determined to be a TextMessage then the body content of the message is extracted and processing proceeds in the same way as for the converted BytesMessage content. This means that JMS applications that want to provide event notifications to a WS-Notification application can choose to send the content as either a BytesMessage or a TextMessage depending upon which is more convenient to the application.

If the received message is neither a BytesMessage nor a TextMessage then it is discarded as having been originated by a non WS-Notification aware (JMS) application.




Related concepts
Use pattern for WS-Notification as an entry or exit point to the service integration bus
JAX-RPC
Learning about WS-Notification
Related tasks
Writing a WS-Notification application that exposes a Web service endpoint
Writing a WS-Notification application that does not expose a Web service endpoint
Providing access for WS-Notification applications to an existing bus topic space
WS-Notification - publish and subscribe messaging for Web services
Securing WS-Notification
Developing applications that use WS-Notification
Related reference
Example: Subscribing a WS-Notification consumer
Example: Pausing a WS-Notification subscription
Example: Publishing a WS-Notification message
Example: Creating a WS-Notification pull point
Example: Getting messages from a WS-Notification pull point
Example: Registering a WS-Notification publisher
Example: Notification consumer Web service skeleton
WS-Notification troubleshooting tips
Related information
WSDL2Java command for JAX-RPC applications
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=rjwsn_ex_sysa2
File name: rjwsn_ex_sysa2.html