Blog Stats
  • Posts - 26
  • Articles - 2
  • Comments - 20
  • Trackbacks - 8

 

BizTalk 2004 - How to assign XML message contents to a string variable

When consuming webservices in BizTalk, you often need to pass an XML message as a string argument to the webservice's method.

This is how you do this:

  • Using mappings, XSLT or whatever, create the target message targetMsg that you need to send as a string argument
  • Define a variable xmlDoc of type System.Xml.XmlDocument in your orchestration
  • In an assign shape, write:
    • xmlDoc = targetMsg;
  • After this statement, the contents of targetMsg are available as string. Use xmlDoc.OuterXml for this (in XLANG/s in the the assign shape)

Thanks to various blog resources on the web.

 


Feedback

No comments posted yet.


Post a comment





 

 

 

 

Copyright © Erwin Homan