I need to save a return of a webservice
to the directory.
How do I write the value of this ret
variable to a xml
file.
Return: XML of type Results.xsd
I tried this way:
WSHP.XMLServer ws = new WSHP.XMLServer();
var xml = GerarXMLConsulta();
string login = "12000";
string senha = "4329";
var ret = ws.getResultado(login, senha, xml);
XmlSerializer ser = new XmlSerializer(typeof(Resultados));
FileStream arquivo = new FileStream("D:\downloads\Retorno.xml", FileMode.CreateNew);
ser.Serialize(arquivo, ret);
The Visual Studio
return error:
Can not convert an object of type 'System.String' to type 'ModulesTags.Results'.