When I call my webservice, it only returns the string "System.Xml.XmlDocument" rather than the actual XML. What do I need to change to get it to return an actual XML document?
public XmlDocument GetCommoditiesXmlDocument() {
XmlDocument xdoc = new XmlDocument();
StringWriter sw = new StringWriter();
XmlTextWriter xtw = new XmlTextWriter(sw);
//gets XML as XmlElement
quotes.WriteTo(xtw);
xdoc.LoadXml(sw.ToString());
return xdoc;
}
I'm using .NET 4.0 (and MVC3 if it matters)