Formatting an XML String for a BizTalk Map

I was calling a WCF service from an orchestration that returned an xml response as a string wrapped in a SOAP header envelope.

I removed the SOAP header envelope with simple string manipulation and was left with an Xml response that I could then load into an XmlDocument type.

The Xml message was then used as the source to a custom XSLT map which did not work properly even though in unit testing the map worked fine.

I removed carriage returns and line feeds from the original string but that did not help either.

Only after indenting the xml string (using System.Xml.Formatting.Indented) and then loading the string into an XmlDocument did the map finally work.

Hope this helps someone else with a similar issue.


0 Responses to “Formatting an XML String for a BizTalk Map”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s



%d bloggers like this: