Running the FIX sample
This topic explains how to put the test messages through the FIX message flow.
The input message
The FIX sample contains the following two test messages:
- FIXtoXML.mbtest
- XMLtoFIX.mbtest
The first input message is a FIX message, which will be converted to an XML message.
The second is an XML message that will be converted to a FIX message.
Running the sample
To run the sample, you must put messages on the input queues,
and get messages from the output queues.
You can use the Dequeue section of the Test Client to retrieve the
messages from the output queues.
If the message is not on the output queue that you expect,
change the name of the output queue to the name of the failure queue.
Use the following instructions to run the sample:
- Put the FIX test message on the FIX_TO_XML_IN queue by using the Test Client:
- In the Broker Development view, expand the FIX Message Flows
project.
- Double-click the FIXtoXML.mbtest file to open it
in the Test Client.
- In the Test Client click Enqueue.
- In the Message Body list, select Import from external file.
- In the FIX Message Flows directory in your workspace, navigate to the
execution-report-b5.bin test message, and select it.
Click OK.
Note that the text from the external file is not displayed in the editor.
- Click Send Message.
The message in the .mbtest file is written to the queue.
When you put a message on the FIX_TO_XML_IN queue,
the FIX_TO_XML_IN MQInput node in the first message flow
(called VALIDATINGFIX2XML.msgflow)
parses the message and validates it against the message set:
- If the message is a valid FIX message,
it is passed to the Compute node, which converts the FIX message to an XML message.
The Compute node then passes the message to the FIX_TO_XML_OUT MQOutput node,
which puts the message on the FIX_TO_XML_OUT queue.
The message is now in XML format.
- If the message is not a valid FIX message,
the message is passed to the FIX_FAIL node,
which puts the message on the FIX_FAIL queue.
- Get the transformed message from the FIX_TO_XML_OUT queue by using Dequeue:
- In the Test Client, click Dequeue.
- Click Get Message to read the
transformed message from the FIX_TO_XML_OUT queue.
- Put the XML test message on the XML_TO_FIX_IN queue using the Test Client:
- In the Broker Development view, expand the FIX Message Flows
project.
- Double-click the XMLtoFIX.mbtest file to open
it in the Test Client.
- In the Test Client, click Enqueue.
- Click Send Message.
The message in the .mbtest file is written to the queue.
When you put a message on the XML_TO_FIX_IN queue,
the XML_TO_FIX_IN MQInput node in the first message flow (called
VALIDATINGXML2FIX.msgflow)
parses the message and validates it against the message set:
- If the message is a valid XML message, it is passed to the Compute node,
which converts the XML message to a FIX message.
The Compute node then passes the message to the XML_TO_FIX_OUT MQOutput node,
which puts the message on the XML_TO_FIX_OUT queue. The message is now in FIX format.
- If the message is not a valid XML message,
the message is passed to the FIX_FAIL node,
which puts the message on the FIX_FAIL queue.
- Get the transformed message from the XML_TO_FIX_OUT queue by using Dequeue:
- In the Test Client, click Dequeue.
- Click Get Message to read the
transformed message from the XML_TO_FIX_OUT queue.
If there is no message on the FIX_TO XML_OUT or XML_TO_FIX_OUT queues,
see Resolving problems when running samples
in the WebSphere Message Broker documentation.
The message might still be on the input queue, or it might be on the FIX_FAIL queue,
or on one of the system queues.
Back to sample home