Running the TCPIP Client Nodes sample

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

For information about the stream control options available on the Advanced tab, see Advanced options.

For an overview of how these nodes work and are configured, see TCP/IP overview in the WebSphere Message Broker documentation.

This sample can also be extended to communicate with a separate TCP/IP server; see Extending the TCPIP Client Nodes sample.

If you encounter any problems when you run the sample, see Resolving problems when running samples in the WebSphere Message Broker documentation.

Running the asynchronous sample

This sample uses the message flows TCPIPAsyncIn, TCPIPAsyncOut, and TCPIPServerSimulation.

To run the sample:

  1. In the Broker Development view, expand the TCPIPClientNodesSampleFlowProject.
  2. Expand the Flow Tests directory, and double-click TCPIPAsyncTest.mbtest to open the message in the Test Client. Click Enqueue.
  3. Click Send Message in the Detailed Properties panel. The following events occur:
  4. Click Dequeue.
  5. Click Get Message in the Detailed Properties panel.
  6. Check that the updated message has been successfully sent back over WebSphere MQ:
    1. View the reply message in the Detailed Properties panel by using the XML Structure view.
    2. Compare this reply message with the message previously sent through the Enqueue event. The element <ServerUpdate>OK</ServerUpdate> has been added to the Header section of the message body.

If all the previous steps are successful, the sample is complete. Look at the nodes in the three message flows, to see how the results were achieved.

Running the synchronous sample

This sample uses the message flows TCPIPSync and TCPIPServerSimulation.

To run the sample:

  1. The asynchronous and synchronous parts of this sample use the same port number; you must, therefore, ensure that the correct flows are deployed for the synchronous sample:
    1. In the WebSphere Message Broker Toolkit, select the Brokers view.
    2. Right-click TCPIPClientNodesSampleExecutionGroup and click Delete > All flows and resources.
    3. Select and open TCPIPClientNodesSampleArchive.bar. On the Prepare tab, clear the TCPIPAsyncIn and TCPIPAsyncOut message flows, and select the TCPIPSync message flow. Ensure that the TCPIPServerSimulation flow and TCPIPClientNodesSampleJavaProject are still selected.
    4. Click Build and Save..., and save the BAR file.
    5. Drag the BAR file onto the TCPIPClientNodesSampleExecutionGroup.
    6. Check that the following objects have been deployed:
      • TCPIPSync message flow
      • TCPIPServerSimulation message flow
      • TCPIPClientNodesSampleJavaProject
  2. In the Broker Development view, expand TCPIPClientNodesSampleFlowProject.
  3. Expand the Flow Tests directory, and double-click TCPIPSyncTest.mbtest to open the message in the Test Client. Click Enqueue.
  4. Click Send Message in the Detailed Properties panel. The following events occur:
  5. Click Dequeue.
  6. Click Get Message in the Detailed Properties panel.
  7. Check that the updated message has been successfully sent back over WebSphere MQ:
    1. View the reply message in the Detailed Properties panel using the XML Structure viewer.
    2. Compare this message with the message previously sent through the Enqueue event. The entire response message is visible as a <Response> element embedded within the message following the original Header, SaleList, and Trailer elements. Expand this response message; <ServerUpdate>OK</ServerUpdate> has been added to the Header section of the message body.

If all the previous steps are successful, the sample is complete. Look at the nodes in the two message flows to see how the results were achieved.

Advanced options

All the TCPIP nodes contain stream control options on their Advanced tabs. The following details give an overview of how the stream control properties are set within the TCPIP Client Nodes sample:

TCPIPAsyncOut message flow

TCPIPAsyncIn message flow

TCPIPSync message flow

TCPIPServerSimulation message flow

Back to sample home