Combining an IBM MQ message with an XML file using the contents of the message to identify which file to use
Combine an incoming message with the contents of an XML file, using fields in the message to determine which file to use.
Before you begin
Put a file on the file system that is local to the integration node, for the FileRead node to read. Here is an example of the file contents:
<Data>Purchase details</Data>
In this example, the contents of the data in the data tag are inserted into the incoming message. Any valid XML structures can be added to this section.
Make a note of the path to the file. For example: c:\temp\FileRead\task3.xml or /tmp/FileRead/task3.
Create the following queues on the integration node queue manager:
- FILEREAD.TASK3.IN1
- FILEREAD.TASK3.OUT1
Detailed information about configuring the node is given on the property panels for the node, in the IBM® App Connect Enterprise Toolkit.
Procedure
Results
The integration node routes the message to the queue FILEREAD.TASK3.OUT1 and inserts data from the file into the Data field of the output message:
<Invoice>
<Directory>c:\temp\FileRead</Directory>
<Name>task2.xml</Name>
<Data>Purchase details</Data>
</Invoice>