A web service that demonstrates use of a JMS control to publish messages to a JMS topic. AccountSubscribe.jws is a companion to this sample.
Use of a JMS control with a topic
Use of custom JMS control methods
Use of JMS message properties
This sample is located in the jms folder of the WebServices project in the SamplesApp sample application. In the file system the location is:
BEA_HOME\weblogic81\samples\workshop\SamplesApp\WebServices\jms\AccountPublish.jws
To Run the Sample
The AccountPublish.jws and AccountSubscribe.jws samples work together. The instructions below describe how to use both services:
Launch the AccountSubscribe.jws service either by opening it in WebLogic Workshop and selecting the Start operation or by entering http://localhost:7001/WebServices/jms/AccountSubscribe.jws in the address bar of your browser. If WebLogic Server is running in the appropriate domain on this machine and you have deployed the SamplesApp sample application, you may click here to run AccountSubscribe.jws.
Since AccountSubscribe.jws is subscribed to the topic via the AccountSubscribeJMSControl.jcx JMS control, it receives the message. If you examine the two JCX files, you will see that the information you entered was encoded in both the message properties and the message body using the @jc:jms-property and @jc:jms-header properties of the JMS controls. When using JMS messaging, the senders and receivers of messages must agree on the message format at design time.