I am using Debatching sample available on BizTalkGurus.com
I am testing Orchestration outside .Net component Debatching using following xml document
[color=blue:e3073d7e36] <ns0:SomeRoot xmlns:ns0=\”http://BizTalkOrch.InPutSchema\”>
<Body>
<anything>Ashish</anything>
</Body>
<Body>
<anything>Joy</anything>
</Body>
</ns0:SomeRoot>[/color:e3073d7e36]
The output I expect is two xml documents
[color=blue:e3073d7e36] <Body>
<anything>Ashish</anything>
</Body>[/color:e3073d7e36]
and
[color=blue:e3073d7e36] <Body>
<anything>Joy</anything>
</Body>[/color:e3073d7e36]
but I am getting the following exception.
[color=red:e3073d7e36]The data at the root level is invalid. Line 1, position 1.
Exception type: XmlException
Source: System.Xml[/color:e3073d7e36]
When I dig into xmlHelper class i found it is using [color=green:e3073d7e36]xmlnode.innertext [/color:e3073d7e36]to return the node.
using this I am getting only the value of node as in My case only \”Ashish\”.
When I change this to [color=green:e3073d7e36]xmlnode.outerxml[/color:e3073d7e36] I get the output properly but gets the following exception.
[color=red:e3073d7e36]Exception type: SerializationException
Source: mscorlib
The type System.Xml.XPath.XPathNodeList in Assembly System.Xml, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 is not marked as serializable.[/color:e3073d7e36]
Any suggestion how can I resolve the issue.