Jump to content

Ways to create BizTalk messages

Posted on:January 21, 2017 at 01:00 AM

For novice BizTalk developers such simple task like creating messages in BizTalk orchestration may become cumbersome. This is what I’ve learned so far :)

Please remember that messages are immutable in BizTalk.

Ways to create message in BizTalk

    Message_2(*) = Message_1(*);
    Message_2.Address = xpath(Message_1,"/*[local-name()='CustomerAddress']");
    xmlMessage = new System.Xml.XmlDocument();
    xmlDocMessage.LoadXml("<customer><address>ABC</address></customer>");
    Message_2 = xmlMessage

First create classes with XSD.exe (xsd.exe /classes /namespace:MyNamespace schema.xsd). Then create a helper class and invoke it inside BizTalk Expression Editor

    Message_2 = helper.CreateMessage_2();