Friday, June 3, 2011

"message part data does not contain at least one of the node"

Error: “…message part data does not contain at least one of the node….”
 
While working on BizTalk projects sometimes, when you want to manipulate a schema output (with promoted/distinguish properties), when you normally try to assign the property values in orchestration you get errors like above.
 
Easiest fix to such scene is:
 
  1. Have your schema distinguished properties
  2. Initialize a temporary variable with following syntax in orchestration expression builder
 
TempDoc=new System.Xml.XmlDocument();
TempDoc.LoadXml("<ns0:OutMsg StdName='' xmlns:ns0='http://PropSchema.OutSchema' /> "); //you can generate whole of this middle portion for your schema by using generate instance ;)
Out=TempDoc;
Out.StdName="Mehul";
 
  1. Try to access properties and assign some value.
 
 
Base rule for BT is you can’t directly access any object or its properties til its loaded in memory using a map or an intializer as shown above. J
 
Mehul Trivedi
trivedimehulk@gmail.com
 
 
 

No comments:

Post a Comment