Академический Документы
Профессиональный Документы
Культура Документы
Construct msgOrderCopy
{
msgOrderCopy = msgOrderOriginal;
//Once the new message is constructed, it can now be modified.
// For example if the schema for the order has distinguished fields,
// these can now be set. XPATH can also be used to set the data in
(Some xpath examples are further down).
msgOrderCopy.OrderedBy = "Bob";
}
In the the First Expression Shape, Construct the initial Order Message
(With just the Order Header), with the help of a XMLDocument variable
construct msgOrderFromAppending
{
// Initially create the Order Header part of the Order Message
varOrderXMLDom.LoadXml(@"<ns0:Order OrderedBy=""SomeBody""
TotalOrderAmount=""0""
xmlns:ns0=""http://ConstructingXMLMessages.Orders""></ns0:Order>
");
msgOrderFromAppending = varOrderXMLDom;
}
In the next expression shape add the order items. Note that in the
Orchestration this expression
shape is in a loop, so there are multiple order items being added.
varOrderXMLDom.FirstChild.AppendChild(varXMLNodeOrderItemNode);
// Now actually construct the Temp message.
msgOrderFromAppendingTemp = varOrderXMLDom;
System.Diagnostics.Debug.WriteLine("The output is " +
varOrderXMLDom.OuterXml);
}
// Now Set the Real Order Message From the Temp Message.
// This is so we can keep adding messages to the real message, without
losing them.
construct msgOrderFromAppending
{
msgOrderFromAppending = msgOrderFromAppendingTemp;
// Set the Data in the newly added Order Item Node.
}
Also look here
# BizTalk 2004 -
# BizTalk -
# BizTalk -