Pessoal,
Corrigi várias tags que estavam erradas.
Mas agora quando mando o XML sem assinar, a SEFIN fala que falta a assinatura. Ou seja não dá mais
erro em outros campos. Mas quando mando a DPS assinada a SEFIN fala que o XML está mal
formado. Será que alguém tem mais alguma dica pra ajudar?
Esse é o erro reportado pela SEFIN:
{"tipoAmbiente":2,
"versaoAplicativo":"SefinNacional_1.6.0",
"dataHoraProcessamento":"2026-02-13T09:08:35.2354943-03:00",
"erros":[{"Codigo":"RNG6110","Descricao":"Falha Schema Xml","Complemento":"Xml mal formado. System.NullReferenceException: Object reference not set to an instance of an object.\r\n at Serpro.Sped.NFSe.Schemas.Controle.ControleValidarSchema.Validar(String xml, TipoDocumentoRequisicao tipoDocReq, ResultadoProcessamento resultado)"}]}
Esse é a listagem da DPS que eu mandei:
Código: Selecionar todos
<?xml version="1.0"?>
<DPS
xmlns="http://www.sped.fazenda.gov.br/nfse" versao="1.01">
<infDPS Id="DPS355030820117489700013200001000000000000001">
<tpAmb>2</tpAmb>
<dhEmi>2026-02-13T09:08:34-03:00</dhEmi>
<verAplic>13.0</verAplic>
<serie>00001</serie>
<nDPS>1</nDPS>
<dCompet>2026-02-13</dCompet>
<tpEmit>1</tpEmit>
<cLocEmi>3550308</cLocEmi>
<prest>
<CNPJ>xxxxxxxxxxxxx</CNPJ>
<IM>xxxxxxx</IM>
<regTrib>
<opSimpNac>3</opSimpNac>
<regApTribSN>1</regApTribSN>
<regEspTrib>0</regEspTrib>
</regTrib>
</prest>
<toma>
<CNPJ>xxxxxxxxxxxxxx</CNPJ>
<xNome>xxxxxxxxxxxxxx</xNome>
<end>
<endNac>
<cMun>xxxxxxx</cMun>
<CEP>xxxxxxxx</CEP>
</endNac>
<xLgr>xxxxxxxxxxxx</xLgr>
<nro>000</nro>
<xBairro>Anhagabau</xBairro>
</end>
</toma>
<serv>
<locPrest>
<cLocPrestacao>3550308</cLocPrestacao>
</locPrest>
<cServ>
<cTribNac>010701</cTribNac>
<xDescServ>Licenciamento mensal de sistemas de computador</xDescServ>
<cNBS>111032200</cNBS>
<cIntContrib>000000018020OL03</cIntContrib>
</cServ>
</serv>
<valores>
<vServPrest>
<vServ>100.00</vServ>
</vServPrest>
<trib>
<tribMun>
<tribISSQN>1</tribISSQN>
<tpRetISSQN>1</tpRetISSQN>
</tribMun>
<tribFed>
<piscofins>
<CST>08</CST>
</piscofins>
</tribFed>
<totTrib>
<pTotTrib>
<pTotTribFed>10.00</pTotTribFed>
<pTotTribEst>0.00</pTotTribEst>
<pTotTribMun>5.00</pTotTribMun>
</pTotTrib>
</totTrib>
</trib>
</valores>
<IBSCBS>
<finNFSe>0</finNFSe>
<indFinal>1</indFinal>
<cIndOp>090102</cIndOp>
<indDest>0</indDest>
<valores>
<trib>
<gIBSCBS>
<CST>000</CST>
<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/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#DPS355030820117489700013200001000000000000001">
<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/2000/09/xmldsig#sha1"/>
<DigestValue>pLNu7zrOXLgoPJdnIGHdySHDI4c=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>xxxxx</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>xxxxxx</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</DPS>
Obrigado,
Jair Pereira