Eu estou desenvolvendo uma api para emissão de NFe e NFCe.
Me deparei com um erro que está impedindo o progresso do desenvolvimento estou recebendo um erro que não é muito comum pelas pesquisas que realizei na Web estou vindo através desse fórum encontrar respostas.
Eu realizo a seguinte requisição para a Sefaz de MG em Homologação no endpoint:
https://hnfce.fazenda.mg.gov.br/nfce/services/NFeStatusServico4
Requisição:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<nfeStatusServicoNF>
<consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
<tpAmb>2</tpAmb>
<cUF>50</cUF>
<xServ>STATUS</xServ>
</consStatServ>
</nfeStatusServicoNF>
</soap:Body>
</soap:Envelope>
recebo a Seguinte resposta:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope
xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns1:Fault
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.w3.org/2003/05/soap-envelope">
<ns1:Code>
<ns1:Value>ns1:Sender</ns1:Value>
</ns1:Code>
<ns1:Reason>
<ns1:Text xml:lang="en">Cannot find dispatch method for {}nfeStatusServicoNF</ns1:Text>
</ns1:Reason>
</ns1:Fault>
</S:Body>
</S:Envelope>
o xml é o:
<consStatServ xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
<tpAmb>2</tpAmb>
<cUF>50</cUF>
<xServ>STATUS</xServ>
</consStatServ>
o problema o ocorre também com a o endpoint de autorização de MG de Homologação:
http://hnfce.fazenda.mg.gov.br/nfce/services/NFeAutorizacao4
Requisição:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
<soap:Body>
<nfeAutorizacaoLote>
<enviNFe xmlns="http://www.portalfiscal.inf.br/nfe" versao="4.00">
<idLote>1</idLote>
<indSinc>1</indSinc>
<NFe xmlns="http://www.portalfiscal.inf.br/nfe">
<infNFe versao="4.00" Id="NFe31230105749654000136650010000001051484980954">
<ide>
<cUF>31</cUF>
<cNF>48498095</cNF>
<natOp>venda</natOp>
<mod>65</mod>
<serie>1</serie>
<nNF>105</nNF>
<dhEmi>2023-01-26T18:33:34-03:00</dhEmi>
<tpNF>1</tpNF>
<idDest>1</idDest>
<cMunFG>3104502</cMunFG>
<tpImp>4</tpImp>
<tpEmis>1</tpEmis>
<cDV>4</cDV>
<tpAmb>2</tpAmb>
<finNFe>1</finNFe>
<indFinal>1</indFinal>
<indPres>1</indPres>
<procEmi>0</procEmi>
<verProc>001</verProc>
</ide>
<emit>
<CNPJ>0000000000000</CNPJ>
<xNome>XXXXXXXXXX</xNome>
<xFant>XXXXXXXXXX</xFant>
<enderEmit>
<xLgr>AVENIDA </xLgr>
<nro>1570</nro>
<xBairro>CENTRO</xBairro>
<cMun>3104502</cMun>
<xMun>Arinos</xMun>
<UF>MG</UF>
<CEP>38680000</CEP>
<cPais>1058</cPais>
<xPais>Brasil</xPais>
<fone>5555998464254</fone>
</enderEmit>
<IE>0000000000</IE>
<CRT>1</CRT>
</emit>
<dest>
<CPF>11410015947</CPF>
<indIEDest>9</indIEDest>
</dest>
<det nItem="1">
<prod>
<cProd>ZYM-848</cProd>
<cEAN>SEM GTIN</cEAN>
<xProd>NOTA FISCAL EMITIDA EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL</xProd>
<NCM>73181500</NCM>
<CEST>1005800</CEST>
<CFOP>5102</CFOP>
<uCom>UN</uCom>
<qCom>5.00</qCom>
<vUnCom>2.10</vUnCom>
<vProd>10.50</vProd>
<cEANTrib>SEM GTIN</cEANTrib>
<uTrib>UN</uTrib>
<qTrib>5.00</qTrib>
<vUnTrib>2.1000</vUnTrib>
<indTot>1</indTot>
</prod>
<imposto>
<vTotTrib>3.75</vTotTrib>
<ICMS>
<ICMSSN102>
<orig>0</orig>
<CSOSN>102</CSOSN>
</ICMSSN102>
</ICMS>
<PIS>
<PISOutr>
<CST>49</CST>
<vBC>0.00</vBC>
<pPIS>0.0000</pPIS>
<vPIS>0.00</vPIS>
</PISOutr>
</PIS>
<COFINS>
<COFINSOutr>
<CST>49</CST>
<vBC>0.00</vBC>
<pCOFINS>0.0000</pCOFINS>
<vCOFINS>0.00</vCOFINS>
</COFINSOutr>
</COFINS>
</imposto>
</det>
<total>
<ICMSTot>
<vBC>0.00</vBC>
<vICMS>0.00</vICMS>
<vICMSDeson>0.00</vICMSDeson>
<vFCP>0.00</vFCP>
<vBCST>0.00</vBCST>
<vST>0.00</vST>
<vFCPST>0.00</vFCPST>
<vFCPSTRet>0.00</vFCPSTRet>
<vProd>10.50</vProd>
<vFrete>0.00</vFrete>
<vSeg>0.00</vSeg>
<vDesc>0.00</vDesc>
<vII>0.00</vII>
<vIPI>0.00</vIPI>
<vIPIDevol>0.00</vIPIDevol>
<vPIS>0.00</vPIS>
<vCOFINS>0.00</vCOFINS>
<vOutro>0.00</vOutro>
<vNF>10.50</vNF>
<vTotTrib>3.75</vTotTrib>
</ICMSTot>
</total>
<transp>
<modFrete>9</modFrete>
</transp>
<pag>
<detPag>
<indPag>0</indPag>
<tPag>01</tPag>
<vPag>10.50</vPag>
</detPag>
</pag>
<infAdic>
<infAdFisco>Tributos Totais Incidentes (Lei Federal 12.741/2012) - Total R$3.75 17.72% Federal 18.00% Estadual FONTE: IBPT</infAdFisco>
</infAdic>
<infRespTec>
<CNPJ>0000000000000</CNPJ>
<xContato>XXXXXXXXXX</xContato>
<email>pradoc@pradoc.com</email>
<fone>00000000000</fone>
</infRespTec>
</infNFe>
<infNFeSupl>
<qrCode>http://portalsped.fazenda.mg.gov.br/portalnfce/sistema/qrcode.xhtml?p=31230105749654000136650010000001051484980954|2|2|1|e7fce546fb6b8a612d5d79a97792de192edf497d</qrCode>
<urlChave>https://sistemas.sefaz.am.gov.br/nfceweb-hom/consultarNFCe.jsp</urlChave>
</infNFeSupl>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></CanonicalizationMethod>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"></SignatureMethod>
<Reference URI="#NFe31230105749654000136650010000001051484980954">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"></Transform>
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></Transform>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></DigestMethod>
<DigestValue>wE3U9u8xpw2YE5CzpFo6LHd6ieY=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>tUpFUEzQGVVALx59xBV5uXHown9wAfREqRtf0Laj8++GVWTuD6FjA6ww9HajbpjexxWE6E4I4nLg96owhJKm7wzcefky38rdVzRTkORFt6o9DlUyQ/mbaGKHYo3NPT1acm4Yd1UmuNIfa6jUlVONDM3X1MhOhiAaUW+JW3fBLopeBLxF9I5z7TzRHcABEf4skjwJESqPs/26jLL8i95pp8NkqDQ1zBXQLTcigfa79GTRlFsrcrxk5E898PAazataW8h1ywlvrv4F7oPdjnmYHpiFZ6pf8z4QxMf+jq0higNVI8+8A7HlsPxySGjURThHDytb++Z7ieJ+asNiGBHkzQ==</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>MIIH+j....</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</NFe>
</enviNFe>
</nfeAutorizacaoLote>
</soap:Body>
</soap:Envelope>
reposta:
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope
xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns1:Fault
xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://www.w3.org/2003/05/soap-envelope">
<ns1:Code>
<ns1:Value>ns1:Sender</ns1:Value>
</ns1:Code>
<ns1:Reason>
<ns1:Text xml:lang="en">Cannot find dispatch method for {}nfeAutorizacaoLote</ns1:Text>
</ns1:Reason>
</ns1:Fault>
</S:Body>
</S:Envelope>
E esse é meu problema gostaria de saber o que posso estar fazendo de errado para receber isso da Sefaz de MG e se possível uma solução para ele.