Erro de assinatura

213 views
Skip to first unread message

Winycius Antônio

unread,
Jul 2, 2026, 12:35:41 PMJul 2
to wsnfsecampinas
Boa tarde,

Ao tentar emitir uma nota eu recebo o seguinte "alerta":
"alertas":[{"codigo":"E0714","mensagem":"Arquivo enviado com erro na assinatura."}]}

No modelo_DPS disponibilizado NÃO existe o nó dedicado a assinatura(Signature), mas de toda forma eu fiz a tentativa de enviar o XML com e sem assinatura. Para ambos os casos o erro foi o mesmo. 

Agora eu não sei se esse é apenas um erro genérico que não corresponde de fato ao problema. Alguém sabe me dizer se precisa ou não assinar o XML do DPS? Se sim, os algorítimos de assinatura seriam os mesmo das notas que ainda são emitidas no padrão ABRASF?

Obs: O XML que enviei assinado tem uma assinatura valida segundo o site da receita.


Paulo Petean

unread,
Jul 2, 2026, 2:44:49 PMJul 2
to wsnfsecampinas

Boa tarde,
Estou com o mesmo problema ao transmitir o xml na url de homologação https://preprod-nfse.ima.sp.gov.br/notafiscal-adn-ws/api/adn/dps.

O xml está valido no site da receita mas a api rejeita.

Retorno:
{"tipoAmbiente":2,"versaoAplicativo":"1.0","dataHoraProcessamento":"2026-07-02T15:34:16.597975881-03:00","idDps":"DPS350950224602030100018800001000000000016807","alertas":[{"codigo":"E0714","mensagem":"Arquivo enviado com erro na assinatura."}]}

wsnfsecampinas

unread,
Jul 3, 2026, 8:08:18 AMJul 3
to wsnfsecampinas
Bom dia


Atenciosamente

Luis Fernando Martins Da Rocha

unread,
Jul 3, 2026, 6:28:06 PMJul 3
to wsnfsecampinas
Olá, boa noite.

Mesmo seguindo as dicas em https://groups.google.com/g/wsnfsecampinas/c/DSeNabJqgP0/m/yUzO1PdIAQAJ, continuo enfrentando o problema:


{"codigo":"E0714","mensagem":"Arquivo enviado com erro na assinatura."}



<infDPS Id="DPS350950220264166300011000000000000000084738">

Já tentei colocar o ID na tag DPS (conforme https://groups.google.com/g/wsnfsecampinas/c/DSeNabJqgP0/m/yUzO1PdIAQAJ):

<DPS Id="DPS350950220264166300011000001000000000084738" versao="1.01">

Tentamos colocar em ambas as tags e, também deu erro. Toda tentativa resulta em:

{"codigo":"E0714","mensagem":"Arquivo enviado com erro na assinatura."}

Estamos enviando da seguinte forma:


xmlBytes=[5340] base64Chars=[4248] field=[dpsXmlGZipB64]
request method: POST
request url: https://preprod-nfse.ima.sp.gov.br/notafiscal-adn-ws/api/adn/dps
request headers: {"Content-Type":"application/json","Accept":"application/json, application/xml, text/xml"}

Payload A:

<DPS Id="DPS350950220264166300011000001000000000084738" versao="1.01">
<infDPS>
<tpAmb>2</tpAmb>
<dhEmi>2026-07-03T19:07:10-03:00</dhEmi>
<verAplic>1.01</verAplic>
<serie>00001</serie>
<nDPS>84738</nDPS>
<dCompet>2026-06-25</dCompet>
<tpEmit>1</tpEmit>
<cLocEmi>3509502</cLocEmi>
<prest>
<CNPJ>???????</CNPJ>
<IM>>???????</</IM>
<regTrib>
<opSimpNac>1</opSimpNac>
<regEspTrib>0</regEspTrib>
</regTrib>
</prest>
<toma>
<CNPJ>>???????</</CNPJ>
<xNome>>???????</ LTDA</xNome>
<end>
<endNac>
<cMun>3550308</cMun>
<CEP>04711904</CEP>
</endNac>
<xLgr>>???????</</xLgr>
<nro>>???????</</nro>
<xBairro>>???????</</xBairro>
</end>
</toma>
<serv>
<locPrest>
<cLocPrestacao>3509502</cLocPrestacao>
</locPrest>
<cServ>
<cTribNac>010301</cTribNac>
<cTribMun>001</cTribMun>
<xDescServ>>???????</</xDescServ>
<cNBS>115069000</cNBS>
</cServ>
</serv>
<valores>
<vServPrest>
<vServ>26947.27</vServ>
</vServPrest>
<trib>
<tribMun>
<tribISSQN>1</tribISSQN>
<tpRetISSQN>1</tpRetISSQN>
<pAliq>5</pAliq>
</tribMun>
<tribFed>
<piscofins>
<CST>00</CST>
<vPis>175.16</vPis>
<vCofins>808.42</vCofins>
<tpRetPisCofins>3</tpRetPisCofins>
</piscofins>
<vRetIRRF>404.2</vRetIRRF>
<vRetCSLL>269.48</vRetCSLL>
</tribFed>
<totTrib>
<indTotTrib>0</indTotTrib>
</totTrib>
</trib>
</valores>
<IBSCBS>
<finNFSe>0</finNFSe>
<cIndOp>100301</cIndOp>
<indDest>0</indDest>
<valores>
<trib>
<gIBSCBS>
<cClassTrib>000001</cClassTrib>
</gIBSCBS>
</trib>
</valores>
</IBSCBS>
</infDPS>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="#DPS350950220264166300011000001000000000084738">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>6Idz0Ti4kNRigWfcnkklzk/WwS7GrE+E1NA7i5Ysms4=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
???????</==</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
>???????</=</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</DPS>

Payload B:

<DPS Id="DPS350950220264166300011000001000000000084738" xmlns="http://www.sped.fazenda.gov.br/nfse"
versao="1.01">
<infDPS Id="DPS350950220264166300011000000000000000084738">
<tpAmb>2</tpAmb>
<dhEmi>2026-07-03T19:24:30-03:00</dhEmi>
<verAplic>1.00</verAplic>
<serie>00001</serie>
<nDPS>84738</nDPS>
<dCompet>2026-06-25</dCompet>
<tpEmit>1</tpEmit>
<cLocEmi>3509502</cLocEmi>
<prest>
<CNPJ>>???????</</CNPJ>
<IM>>???????</</IM>
<regTrib>
<opSimpNac>1</opSimpNac>
<regEspTrib>0</regEspTrib>
</regTrib>
</prest>
<toma>
<CNPJ>>???????</</CNPJ>
<xNome>>???????</ LTDA</xNome>
<end>
<endNac>
<cMun>3550308</cMun>
<CEP>04711904</CEP>
</endNac>
<xLgr>>???????</</xLgr>
<nro>>???????</</nro>
<xCpl>>???????</</xCpl>
<xBairro>>???????</</xBairro>
</end>
</toma>
<serv>
<locPrest>
<cLocPrestacao>3509502</cLocPrestacao>
</locPrest>
<cServ>
<cTribNac>170101</cTribNac>
<cTribMun>749019901</cTribMun>
<xDescServ>>???????</</xDescServ>
</cServ>
<infoCompl>
<xInfComp>>???????</</xInfComp>
</infoCompl>
</serv>
<valores>
<vServPrest>
<vServ>1000.00</vServ>
</vServPrest>
<trib>
<tribMun>
<tribISSQN>1</tribISSQN>
<tpRetISSQN>1</tpRetISSQN>
</tribMun>
<tribFed>
<piscofins>
<vBCPisCofins>1000.00</vBCPisCofins>
<pAliqPis>0.65</pAliqPis>
<pAliqCofins>3.00</pAliqCofins>
<vPis>6.50</vPis>
<vCofins>30.00</vCofins>
<tpRetPisCofins>1</tpRetPisCofins>
</piscofins>
<vRetIRRF>15.00</vRetIRRF>
<vRetCSLL>46.50</vRetCSLL>
</tribFed>
<totTrib>
<vTotTrib>
<vTotTribFed>0.00</vTotTribFed>
<vTotTribEst>0.00</vTotTribEst>
<vTotTribMun>0.00</vTotTribMun>
</vTotTrib>
</totTrib>
</trib>
</valores>
<IBSCBS>
<finNFSe>0</finNFSe>
<indFinal>0</indFinal>
<indDest>0</indDest>
</IBSCBS>
</infDPS>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
<SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
<Reference URI="#DPS350950220264166300011000001000000000084738">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
<Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" />
<DigestValue>8KqA5ijE9nQBRJO7DiTKP8nP4wQ3wxmNNy6+zDBeCp8=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>
>???????</==</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>
>???????</=</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</DPS>

Com esse payload a resposta muda um pouco:

[500]. Response payload: [jakarta.xml.bind.UnmarshalException: elemento inesperado (uri:"http://www.sped.fazenda.gov.br/nfse", local:"DPS"). Os elementos esperados são <{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod>,<{}DPS>,<{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue>,<{http://www.w3.org/2000/09/xmldsig#}DigestMethod>,<{http://www.w3.org/2000/09/xmldsig#}DigestValue>,<{http://www.w3.org/2000/09/xmldsig#}KeyInfo>,<{http://www.w3.org/2000/09/xmldsig#}KeyName>,<{http://www.w3.org/2000/09/xmldsig#}KeyValue>,<{http://www.w3.org/2000/09/xmldsig#}Manifest>,<{http://www.w3.org/2000/09/xmldsig#}MgmtData>,<{}NFSe>,<{http://www.w3.org/2000/09/xmldsig#}Object>,<{http://www.w3.org/2000/09/xmldsig#}PGPData>,<{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue>,<{http://www.w3.org/2000/09/xmldsig#}Reference>,<{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod>,<{http://www.w3.org/2000/09/xmldsig#}SPKIData>,<{http://www.w3.org/2000/09/xmldsig#}Signature>,<{http://www.w3.org/2000/09/xmldsig#}SignatureMethod>,<{http://www.w3.org/2000/09/xmldsig#}SignatureProperties>,<{http://www.w3.org/2000/09/xmldsig#}SignatureProperty>,<{http://www.w3.org/2000/09/xmldsig#}SignatureValue>,<{http://www.w3.org/2000/09/xmldsig#}SignedInfo>,<{http://www.w3.org/2000/09/xmldsig#}Transform>,<{http://www.w3.org/2000/09/xmldsig#}Transforms>,<{http://www.w3.org/2000/09/xmldsig#}X509Data>,<{}evento>,<{}pedRegEvento>

Poderiam nos ajudar?

Luciana A. Konno

unread,
Jul 6, 2026, 10:38:39 AM (14 days ago) Jul 6
to Luis Fernando Martins Da Rocha, wsnfsecampinas
Bom dia a todos!!

Alguém conseguiu corrigir esse erro da assinatura? 

No exemplo (modelo_dps_o.pdf) diz pra assinar a TAg infdps e no email sobre recomendações, diz pra assinar a tag DPS. 
Ja fiz das duas formas e o erro continua.

Obrigada! 


Sent from Gmail Mobile

"Esta mensagem é confidencial e destinada apenas ao destinatário. Caso a tenha recebido por engano, delete-a e avise o remetente.
Estamos em conformidade com a LGPD (Lei nº 13.709/2018). Para mais informações, consulte nossa política de privacidade."

"This message is confidential and intended only for the recipient. If you have received it by mistake, delete it and notify the sender.
We comply with the LGPD (Law No. 13.709/2018). For more information, please refer to our privacy policy."

--
You received this message because you are subscribed to the Google Groups "wsnfsecampinas" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wsnfsecampina...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wsnfsecampinas/0d6ddd6b-eb85-4669-af25-6c9b648fbb7an%40googlegroups.com.

Luis Fernando Martins Da Rocha

unread,
Jul 6, 2026, 11:24:53 AM (14 days ago) Jul 6
to wsnfsecampinas
Bem observado. Eu também notei o seguinte:

Erro SEM a tag <!--cTribMun>001</cTribMun-->

{"codigo":"E0314","mensagem":"O código de tributação municipal informado não existe ou não está administrado pelo município de incidência do ISSQN na data de competência informada na DPS,"}

Erro COM a tag <cTribMun>001</cTribMun>

2026-07-06 12:22:38 [NETSUITE-PREFEITURA-RTC-NFSE-INT] error: [PROCESS] ERROR: DPS RTC Response Status for invoice 35374(7425528): [400]. Response payload: [{"tipoAmbiente":2,"versaoAplicativo":"1.0","dataHoraProcessamento":"2026-07-06T12:22:38.969332236-03:00","alertas":[{"codigo":"E0714","mensagem":"Arquivo enviado com erro na assinatura."}]}]

Parece que esse campo cTribMun é o principal problema agora

wsnfsecampinas

unread,
Jul 7, 2026, 9:20:50 AM (13 days ago) Jul 7
to wsnfsecampinas
Bom dia

Publiquei um novo post, corrigindo as recomendações da assinatura digital e anexei um exemplo.
https://groups.google.com/g/wsnfsecampinas/c/SWvZuj6AOso/m/G0gst4KGAgAJ

Atenciosamente

Leo Martins

unread,
Jul 15, 2026, 4:00:13 PM (5 days ago) Jul 15
to wsnfsecampinas
Opa, tudo bem?
Estou com o mesmo problema. Vocês conseguiram resolver?
Obrigado,
Leonardo

Em segunda-feira, 6 de julho de 2026 às 12:24:53 UTC-3, lfr...@cpqd.com.br escreveu:
Reply all
Reply to author
Forward
0 new messages