Hi, I have this problem and I’m new to BizTalk, and looking for help here..
I have an expression shape inside my orchestration that calls a .net method which returns an Xml string. I need to get the number of occurrences of a specific field in this Xml, so I created an Xml document in the orchestration and fetched a NodeList for the field, and then got the Count property of it. On compile I got the error : “a non-serializable object type ‘System.Xml.XmlNodeList myXmlNodeList’ can only be declared within an atomic scope or service”. Here is the code
myXmlDoc.LoadXml(xmlStr);
myXmlNodeList = myXmlDoc.SelectNodes(“//node”);
intCount = myXmlNodeList.Count;
Actually I’m not sure if this is the right way or the best practice to do it in the first place..!