The .NETInput node sample is a message flow sample application that shows how you can use a message flow to get messages from MSMQ by using code which has been written in C#.
The sample uses .NETInput nodes with code written in C#, built into an assembly (with extension .dll) using Microsoft™ Visual Studio 2012. IBM® Integration Bus installs templates into Microsoft Visual Studio, which provide a basic method structure to which a flow developer can then add their own code. Users of this sample may not have access to a Microsoft Visual Studio installation, so a prebuilt assembly file is provided to enable users to deploy and run the sample without Microsoft Visual Studio. The sample also provides the C# source code. For more information, see C# code for the .NETInput node sample.
The scenario consists of an MSMQ Application which provides a lookup service. If the application is sent a house number and a postal code, it returns fully populated address information (street, city, and county). A fixed-length message containing the house number and postal code is sent to a WebSphere MQ queue. A message flow parses this using a DFDL message model and writes an XML message to the MSMQ queue. This XML message is read by a second message flow using a .NETInput node. The address fields are populated, and a response message is written to an MSMQ response queue. A third message flow reads this data, and returns it to a WebSphere MQ response queue.
There are three message flows used:
The message flow named MQRequestToMSMQ.msgflow, does the following:
The second message flow named SimulateMSMQApp.msgflow copies the MSMQ CorrellD to the reply message, which is written to the MSMQ reply queue:
The message flow named MSMQResponseToMQ.msgflow, reads the message from the MSMQ Reply Queue and sends to the MQ Output Queue. The CorrelID of MSMQ is put into CorrelID of MQMD.
For more information about COBOL, see the COBOL sample.
The following sections include example input messages in a fixed-length format. The output messages are included in the Running the sample section.
888 ABC888DEE 777 ABC777DEE 666 ABC666DEE 555 ABC555DEE 444 ABC444DEE
After you have imported and deployed the sample, you can run it by following the instructions in the Running the sample section.