Running the JMSHeader node sample
After you have imported and deployed the sample, you can run it
by using the following instructions.
This topic includes instructions for running the sample. It also
includes the expected output message, so that you can confirm that the
sample has worked. For more information on the sample, read
About the JMSHeader node sample.
If you encounter any problems when you run the sample,
see Resolving problems when running samples
in the WebSphere Message Broker documentation.
- You must set up the JNDI environment before you can run the sample;
see Setting up the JNDI.
- On Windows, if you have already run "Import and partially deploy
the sample", you can continue to bullet 3 and start testing the
message flow, if not:
- On Windows: Deploy the JMSCoordinatedRequestReply.bar
broker archive (BAR) file.
- On UNIX: If the .bindings file is created
under /home/db2admin/JNDI-Directory, deploy
the JMSCoordinatedRequestReplyUnix.bar BAR
file. If the .bindings file is created under
a different folder, modify the JMSCoordinatedRequestReplyUnix.bar
BAR file by using the Broker Archive editor. Open the
JMSCoordinatedRequestReplyUnix.bar file, go
to the Configure tab and change the
Location JNDI Bindings property to
file:/home/username/JNDI-Directory for all
the JMSInput and JMSOutput nodes in each .cmf
file.
- Put the test message to the input queue:
- In the Broker Development view, expand the "JMSHeader node
message flows" project.
- Use the InputMessage.enqueue enqueue file, which is supplied
with the JMS Header sample, to put the request message
<StockInformation><CompanyName>IBM</CompanyName></StockInformation>
on the JMSInput queue. If you cannot use the InputMessage.enqueue
enqueue file that is supplied with the sample, you can put the
<StockInformation><CompanyName>IBM</CompanyName></StockInformation>
request message directly on the REQUEST_INQ queue.
- Get the processed message from the output queue:
- Use the OutputMessage.mbtest file, which is supplied with the
JMS Header sample, to get the output message.
- Click Get Message to read a message from the
REPLY_OUTQ queue.
- Go to the XML Source tab.
On Linux: You might have to click the
XML or Hexadecimal tab to view the message.
- The Output message comes with the MQRFH header, in the message check for:
<?xml version="1.0"?><StockInformation
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyName>IBM</CompanyName><Price>150</Price>
</StockInformation>
Back to sample home