Running the MQHeader node sample

After you have imported and deployed the sample, you can run it by following the instructions in the Running the sample section.

This topic also includes an example input test message and a corresponding expected output message so that you can confirm that the sample has worked.

If you encounter any problems when you run the sample, see Resolving problems when running samples in the IBM Integration Bus documentation.

Input test message

The test message that is used to run this sample is based on the following format:

<isPrime><input>5</input></isPrime>

Running the sample

This sample uses the message flow ADD_DELETE_MQMD_MQHeaderNode. The sample uses two queues, STOREMQ.OUT and RESULT.OUT, which are automatically created under the default queue manager by the sample wizard when you deploy the sample.

To send the HTTP requests you can use the following steps, or you can download and use any freeware HTTP client, for example, "Net Tool".

To run the sample:

  1. Deploy the mqheadersample.bar BAR file. This BAR file is deployed automatically by the sample wizard if you choose the "Import and deploy" option for the sample.
  2. Expand the folders under the MQHeader Node Message Flow project.
  3. Right-click the HTTPInput node (GetHTTPMessage) in the ADD_DELETE_MQMD_MQHeadernode flow, select Test.
  4. In the Message Body list, select Import from external file.
  5. Click Workspace.
  6. In the MQHeader Node Message Flows project, navigate to MQMD_Input_Message.txt, and select it. Click OK. Note that the text from the external file is not displayed in the editor.
  7. To send the message, click Send message. In the Deployment Location window, select the MQHeaderNodeSampleExecutionGroup integration server, click Finish.
  8. Compare the HTTPReply with the expected output message shown later in this section.

The sample is complete if all the previous steps are successful. Look at the Java code in the ADD_DELETE_MQMD_MQHeaderNode message flow to see how this sample works.

Expected output message

The following message is the expected output message:

<result>5 is a prime number.</result>

Back to sample home