Extending the TCPIP Client Nodes sample

This extension demonstrates how to extend the sample to incorporate a separate, stand-alone TCP/IP server, in place of the TCPIPServerSimulation flow that is described in the asynchronous sample, that is configured to echo data back to a connecting client.

This extension also demonstrates how to override some of the connection properties by using the local environment.

Overview of sample extension:

Running the sample extension:

  1. Modify the message flows to communicate with your TCP/IP sever by using one of the following options:
  2. Ensure that the TCPIPClientNodesSampleArchive.bar BAR file contains the asynchronous, rather than the synchronous, message flows. If you have modified the flows as shown in the previous step, rebuild and save the BAR file:
  3. Deploy the BAR file into the TCPIPClientNodesSampleExecutionGroup.
  4. Open TCPIPAsyncExtendTest.mbtest, click Enqueue, and click Send Message. The following events occur:
    1. The modified message is sent into the TCPIPAsyncIn message flow.
    2. The JavaCompute node copies the updated host name and port into the local environment ($LocalEnvironment/Destination/TCPIP/Output/).
    3. The TCPIPClientOutput node sends the data by using the Connection details that have been overridden in the local environment.
    4. The TCP/IP server picks up this data and echoes it back on the same port.
    5. This data is received by the TCPIPClientInput node in the TCPIPAsyncIn message flow, which processes the data in the same way in which it processed the data in the asynchronous sample.
  5. Click Dequeue, and then click Get Message.
  6. Check that the updated message has been sent back over WebSphere MQ successfully:
    1. View the reply message in the Detailed Properties panel by using the XML Structure view.
    2. Compare this message with the message previously sent through the Enqueue event. Unless the TCP/IP server has altered the message body, the two messages are identical.

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.

The Connection details property on the Basic tab looks similar to the following screen capture:

TCPIP nodes port modification

Back to sample home