Creating a message with a .NETCompute node

Write appropriate code in the UserCode region of a CreateNode class.

Procedure

  1. In Microsoft Visual Studio, add an instance of the Class to create a Message Broker message to your project.
  2. Add the appropriate code to the UserCode region of the class that you created.
    The following example creates a simple message:
    outputRoot.CreateLastChildUsingNewParser(NBParsers.XMLNSC.ParserName);
    outputRoot["XMLNSC"].CreateFirstChild(null, "Message"); 
    outputRoot["XMLNSC"]["Message"].CreateFirstChild(null, "Element").SetValue("Some Data");  
  3. Build your project, and then associate the .dll file with a .NETCompute node.
    If the example code is associated with a .NETCompute node between an MQInput node and an MQInput node, the following message is created:
    <Message><Element>Some Data</Element></Message>