0
I’m having a problem formatting the message we sent to the web service of the service to consume the Nfe service.
Upload this String to the web service:
var sbXml = new StringBuilder();
sbXml.Append(@"<?xml version=""1.0"" encoding=""UTF-8""?>
<consStatServ xmlns=""http://www.portalfiscal.inf.br/nfe"" versao=""2.00"">
<tpAmb>2</tpAmb>
<cUF>35</cUF>
<xServ>STATUS</xServ>
</consStatServ>");
Only I’m getting this:
<retConsStatServ versao="3.10" xmlns="http://www.portalfiscal.inf.br/nfe"><tpAmb>2</tpAmb><verAplic>SP_NFE_PL_008f</verAplic><cStat>239</cStat><xMotivo>Rejeição: Cabeçalho - Versão do arquivo XML não suportada</xMotivo><cUF>35</cUF><dhRecbto>0001-01-01T00:00:00+00:00</dhRecbto></retConsStatServ>
Indicating the following error : Unsupported XML file version
Does anyone know what modification I have to do? , I have checked the version this right, the Web Service accepts.
Are you leaking the quotes? Can you show us the header of this XML generated by this Stringbuilder? I do not advise you to create Xmls like this.
– fpg1503
You’re sending the right service?
– Bacco
The result is this: '<? xml version="1.0" encoding="UTF-8"? ><consStatServ xmlns="portalfiscal.inf.br/nfe"; versao="2.00"><tpAmb>2</tpAmb><cUF>35</cUF><xServ>STATUS</xServ></consStatServ>'
– bp002
What service address you are using?
– Bacco
[https://homologacao.nfe.fazenda.sp.gov.br/ws/nfestatusservico2.asmx]
– bp002
This is version 3. See here: http://www.nfe.fazenda.gov.br/portal/WebServices.aspx. Tried with
https://homologacao.nfe.fazenda.sp.gov.br/nfeweb/services/nfestatusservico2.asmx
?– Bacco
Strange as it is, I had already done a test with 3.10 but it didn’t work, I tried again checking the link at the address of version 3 and now it worked . !
– bp002
In fact, better already working with the 3.10 same, soon ends the deadline of the 2.
– Bacco
Exactly, vlw for the help !
– bp002