G
Guest
Hello Guys:
Although I am trying to do this for a BizTalk component, I thought since it
was written using C# to create the assembly (.dll), that I could post it here
for some advice and help.
I have an orchestration that we need to call out to a custom assembly and
manipulate the data, and return that data (this is not the final product,
just want to verify we can return the proper value).
public XLANGMessage CleanXML (XLANGMessage inputFile)
{
XmlDocument xDoc = new XmlDocument();
XLANGMessage outputFile;
xDoc = (System.Xml.XmlDocument) inputFile[0].RetrieveAs(xDoc.GetType());
MemoryStream ms = new MemoryStream();
StreamReader sr = new StreamReader(ms);
ms.Seek(0, SeekOrigin.Begin);
string xml = sr.ReadToEnd();
outputFile[0].LoadFrom(xml);
return outputFile;
}
I keep getting an error stating "Use of unassigned local variable
'outputFile'. I tried to create the 'outputFile' using = new ....., but that
also gave an error.
What are we doing wrong?
Thanks
Andy
Although I am trying to do this for a BizTalk component, I thought since it
was written using C# to create the assembly (.dll), that I could post it here
for some advice and help.
I have an orchestration that we need to call out to a custom assembly and
manipulate the data, and return that data (this is not the final product,
just want to verify we can return the proper value).
public XLANGMessage CleanXML (XLANGMessage inputFile)
{
XmlDocument xDoc = new XmlDocument();
XLANGMessage outputFile;
xDoc = (System.Xml.XmlDocument) inputFile[0].RetrieveAs(xDoc.GetType());
MemoryStream ms = new MemoryStream();
StreamReader sr = new StreamReader(ms);
ms.Seek(0, SeekOrigin.Begin);
string xml = sr.ReadToEnd();
outputFile[0].LoadFrom(xml);
return outputFile;
}
I keep getting an error stating "Use of unassigned local variable
'outputFile'. I tried to create the 'outputFile' using = new ....., but that
also gave an error.
What are we doing wrong?
Thanks
Andy