1
I’m implementing communication with the SEFAZ WS. After sending the Note, I am having difficulty obtaining XML content from the return in string format and reading the Receipt.("infRec") Follow print screen with the completed return, does anyone know how to convert this return and read the values as mentioned above ( String XML and Field Receipt)? Follow the requisition code.
NfeAutorizacao.NfeAutorizacao aut = new NfeAutorizacao.NfeAutorizacao();
aut.ClientCertificates.Add(certificado);
nfeDadosMsg dados = new nfeDadosMsg();
aut.nfeCabecMsgValue = new nfeCabecMsg();
aut.nfeCabecMsgValue.cUF = "31";
aut.nfeCabecMsgValue.versaoDados = "3.10";
XmlDocument xml = new XmlDocument();
xml.LoadXml(param);
XmlNode newnode = xml.DocumentElement;
Object[] res = aut.NfeAutorizacaoLote(newnode);
Welcome, I recommend making a [tour], in order to frame your question in the SO-pt model. Ideal is to post together with the question the code you already tried, for evaluation and more ease in solving the problem
– Renan Carlos
Try this solution: http://answall.com/questions/50629/retorno-authorizing%C3%A7%C3%A3o-nfe-3-10-mg-c? noredirect=1&lq=1
– rubStackOverflow
What is the Exception that is returning to you?
– Thiago Lunardi
@Thiagolunardi, none occurs. I need to take res[0] and save it in XML and then read the XML data field by field. I think I need to convert Xmlnode[] to an Xmlnode. How to do ?
– Thiago Balbino
Make a breakpoint, Shift+F9, make a watch on
res
and navigate to where you need it. You’ll see how to recover what you need.– Thiago Lunardi
@Thiagolunardi thanks for the help!! I had to serialize res[0] and save the content serialized XML file. It worked.
– Thiago Balbino