Wednesday, August 09, 2017

Copy any message to a single node on destination message

This example is to copy any input message, the whole XML into a single node on a destination typed message.

In this example, I use this destination schema:

I want to copy any input message inside the node MyRecord. Your record must have a Any child record.

With the xpath function inside our orchestration is easy.

  • Get the content of the source XML in an System.Xml.XmlElement variable (Variable_1):
Variable_1 = xpath(Message_1, "/");
  • Init the destination message with a Message Assignment shape:
  • In the same shape, assign with xpath function the XmlElement.
xpath(Message_2, "/*[local-name()='Root' and namespace-uri()='http://BizTalkMassCopy.Schema1']/*[local-name()='MyRecord' and namespace-uri()='']") = Variable_1;
This is my orchestration:

No comments: