I am trying to send the evtInfoEmpregador
event and when querying the batch return is returning the message.
<tipo>1</tipo>
<codigo>142</codigo>
<descricao>Assinatura do evento inválida. Ações Sugeridas: Verificar se houve alteração do evento após a assinatura. Verificar a validade da assinatura.</descricao>
<localizacao>/eSocial/Signature</localizacao>
I am generating the event, signing and including in the batch, however, after signing, I make an XElement.Parse, because the signature method returns a string.
Follow sent / signed XML, hiding only the data of the signature and CNPJ.
<eSocial xmlns="http://www.esocial.gov.br/schema/lote/eventos/envio/v1_1_1">
<envioLoteEventos grupo="1">
<ideEmpregador>
<tpInsc>1</tpInsc>
<nrInsc>12345678</nrInsc>
</ideEmpregador>
<ideTransmissor>
<tpInsc>1</tpInsc>
<nrInsc>12345678000100</nrInsc>
</ideTransmissor>
<eventos>
<evento Id="ID1123456780000002018020809200100001">
<eSocial xmlns="http://www.esocial.gov.br/schema/evt/evtInfoEmpregador/v02_04_01">
<evtInfoEmpregador Id="ID1123456780000002018020809200100001">
<ideEvento>
<tpAmb>2</tpAmb>
<procEmi>1</procEmi>
<verProc>VISUALCONTAB</verProc>
</ideEvento>
<ideEmpregador>
<tpInsc>1</tpInsc>
<nrInsc>12345678</nrInsc>
</ideEmpregador>
<infoEmpregador>
<inclusao>
<idePeriodo>
<iniValid>2018-02</iniValid>
</idePeriodo>
<infoCadastro>
<nmRazao>razao social</nmRazao>
<classTrib>01</classTrib>
<natJurid>2062</natJurid>
<indCoop>0</indCoop>
<indConstr>0</indConstr>
<indDesFolha>0</indDesFolha>
<indOptRegEletron>0</indOptRegEletron>
<indEntEd>N</indEntEd>
<indEtt>N</indEtt>
<contato>
<nmCtt>contato</nmCtt>
<cpfCtt>123456789</cpfCtt>
<foneFixo>11111111</foneFixo>
<email>[email protected]</email>
</contato>
<infoOrgInternacional>
<indAcordoIsenMulta>0</indAcordoIsenMulta>
</infoOrgInternacional>
<softwareHouse>
<cnpjSoftHouse>123456789</cnpjSoftHouse>
<nmRazao>razao</nmRazao>
<nmCont>contato</nmCont>
<telefone>1111111</telefone>
<email>[email protected]</email>
</softwareHouse>
<infoComplementares>
<situacaoPJ>
<indSitPJ>0</indSitPJ>
</situacaoPJ>
</infoComplementares>
</infoCadastro>
</inclusao>
</infoEmpregador>
</evtInfoEmpregador>
<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="">
<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>LZcxUBLLOhWamtF6nkHI4JkU5n3nQXsTnoQxj0EY9IY=</DigestValue>
</Reference>
</SignedInfo>
<SignatureValue>******</SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate>******</X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
</eSocial>
</evento>
</eventos>
</envioLoteEventos>
Does anyone know what might be happening?