WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Transferring binary (CWF) data from a TCP/IP server socket to a flat file

Transfer binary Custom Wire Format (CWF) data from a TCP/IP server socket to a flat file, by the use of a message set and a message flow with TCPIPServerInput and FileOutput nodes.

Scenario: A client application opens a TCP/IP socket and sends a binary (CWF) document. The end of the document is signaled by the closure of the client connection.

Instructions: The following steps describe how to write a message flow that can receive the binary document and write it to a flat file. Each message is written to a separate file, the name of which is based on the ID of the connection.

  1. Create a message set called Task2_MsgSet. For more information, see Message Sets: Creating a message set.
  2. Create a message flow called TCPIP_Task2 with a TCPIPServerInput node and a FileOutput node. For more information, see Creating a message flow.
  3. Connect the Out terminal of the TCPIPServerInput node to the In terminal of the FileOutput node.
    TCPIPServerInput node connected to a FileOutput node.
  4. Set the following properties of the TCPIPServerInput node:
    1. On the Basic tab, set the Connection details property to 14142.
    2. On the Input Message Parsing tab, set the following properties:
      • Set the Message domain property to MRM.
      • Set the Message set property to Task2_MsgSet.
      • Set the Message type property to Task2_MsgType.
      • Set the Message format property to Binary1.
  5. Set the following properties of the FileOutput node:
    1. On the Basic tab, set the following properties:
      • Set the Directory property to c:\temp\task2.
      • Set the File name or pattern property to Task2.out.
    2. On the Request tab, set the Request file name property location property to $LocalEnvironment/TCPIP/Input/ConnectionDetails/Id.
  6. Save the message flow.
  7. Create a project reference between the Message Broker project and the message set project. For more information, see Adding and removing library references.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:32


Task topicTask topic | Version 8.0.0.7 | ac67430_