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!
09572e20-29de-4e2c-9c1d-4e7b59e26200|0|.0
Tags: