'System.Xml.XmlDocument' does not contain a definition for 'XXXX' in BizTalk 2006

by Dominic Zukiewicz 7. June 2007 10:55
I was recently involved in a project where the filename was named depending on one of the distinguished fields in the XML. The code I  used was similar to:

OutboundMessage(FILE.ReceivedFileName) = InboundDespatch.InnerSchema1.Property1.ToString() + ".txt";

This caused a compilation error stating:

'System.Xml.XmlDocument' does not contain a definition for 'Property1'

It turns out that the generated code does not like the .ToString() method. To get around this, you can use the convert methods to convert it:

OutboundMessage(FILE.ReceivedFileName) = System.Convert.ToString(InboundDespatch.InnerSchema1.Property1) + ".txt"

And the problem vanishes!

Tags:

Comments

4/23/2008 5:13:34 PM #

Great article Dom, I just wish I had noticed it earlier today - it woudl have saved me a lot of time Smile

Matt N |

Powered by BlogEngine.NET 1.5.0.7
Theme by Interakting

Interakting

A full service digital agency offering online strategy, design and usability, systems integration and online marketing services that deliver real business benefits and ensure your online objectives are met.

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

View posts in large calendar