The submitted document is not a valid eSocial xml

Asked

Viewed 800 times

-2

I am sending this xml to the webservice of E-social but always displays the same message:

There’s a way you can help me by taking a look at the xml.

The submitted document is not a valid eSocial xml. There is no namespace tag http://www.esocial.gov.br/schema/lote/eventos/envio/v1_1_1 )

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlnssd="http://www.w3.org/2001/XMLSchema" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6153="http://tempuri.org"><SOAP-ENV:Body> 
<eSocial xmlns="http://www.esocial.gov.br/schema/lote/eventos/envio/v1_1_1"> 
<envioLoteEventos grupo="1"> 
<ideEmpregador> 
<tpInsc>1</tpInsc> <ideTransmissor> </ ideEmpregador> 
<nrInsc> 23111341 </ nrInsc> 
<tpInsc> 1 </ tpInsc>  
<nrInsc> 23111341000190 </ nrInsc>  
</ ideTransmissor>  
<eventos>  
<evento Id = "ID1231113410001902018030510140000001">  
<eSocial xmlns = "http://www.esocial.gov.br/schema/ Evt / evtInfoEmpregador / v02_02_02 ">  
<evtInfoEmpregador Id =" ID1231113410001902018030510140000001 ">  
<ideEvento>  
<tpAmb> 2 </ tpAmb>  
<procEmi> 1 </ procEmi>  
<verProc> 1.0 </ verProc>  
</ ideEvento>  
<ideEmpregador>  
< tpInsc> 1 </ tpInsc>  
<nrInsc> 23111341000190 </ nrInsc>  
</ ideEmpregador>  
<infoEmpregador>  
<inclusao> 
<idePeriodo>  
<iniValid> 2018-03 </ iniValid>  
</ idePeriodo>  
<infoCadastro> 
<nmRazao> NOME EMPRESA ME </ nmRazao>  
<classTrib> 01 </ classTrib>  
<natJurid> 2240 </ natJurid>  
<indCoop> 0 </ indCoop>  
<indConstr> 0 </ indConstr>  
<indDesFolha> 0 </ indDesFolha>  
<indOptRegEletron> 1 </ indOptRegEletron>  
<multTabRubricas> N </ multTabRubricas>  
<indEntEd> N </ indEntEd>  
<indEtt> N </ indEtt>  
<contato>  
<nmCtt> Nome do Contato </ nmCtt>  
<cpfCtt> 12345678909 < / cpfCtt>  
<foneFixo> 1123452345 </ foneFixo>  
<email> [email protected] </ email>  
</ contato>  
<softwareHouse>  
<cnpjSoftHouse> 12345678000195</cnpjSoftHouse> 
<nmRazao>Nome da Software House</nmRazao> 
<nmCont>Nome do Contato</nmCont> 
<telefone> 1123452345 </ telefone>  
<email> [email protected] </ email>  
</ softwareHouse  
>  
<infoComplementares>  
<situacaoPJ> <indSitPJ> 0 </ indSitPJ>  
</ situacaoPJ>  
</ infoComplementares>  
</ infoCadastro>  
</ inclusao>  
</ infoEmpregador>  
</ evtInfoEmpregador>  
<Assinatura 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 = "#">  
< Transforma> 
<Transform Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature" /> 
<Algoritmo de transformação = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315" />  
</ Transforms>  
<DigestMethod Algorithm = "http://www.w3.org/2000/ 09 / xmldsig # sha1 "/>  
<DigestValue> Haor6NuS2GAGAnwZaeTSjc4kgjo = </ DigestValue>  
</ Reference>  
</ SignedInfo> <SignatureValue> <SignatureValue> <KeyInfo> <X509Data> <X509Certificate> </ X509Certificate> </ X509Data> </ KeyInfo> </ Signature>  
</ eSocial>  
</ evento>  
</ eventos>  
</ envioLoteEventos>  
</ eSocial> </ SOAP-ENV: Corpo> </ SOAP-ENV: Envelope> 
  • And where is your xml?

  • I tried to copy and paste here but does not accept, says it is a span

  • <?xml version="1.0" encoding="UTF-8"? ><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlnssd="http://www.w3.org/2001/XMLSchema" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns6153="http://uritemp.org"><SOAP-ENV:Body> <eSocial xmlns="http://www.esocial.gov.br/schema/lote/eventos/envio/v1_1_11">

  • do not post link, put xml as code in your question

  • Give me an email of your that I send the template

  • that’s not how it works around here, include xml in your question by hiding sensitive information.

  • But if I withdraw links, how will you check if the SOAP calls and digital certificate signatures are correct ?

  • Paste the xml into the question, select the text and use the Ctrl+k shortcut or click the icon { }.

  • an observation... if you have these ";" in your xml, this is already a mistake

  • ready I edited the question and put the xml

Show 5 more comments

1 answer

1

See a correct XML from S-1000 (Information from the Employer) to the eSocial:

<?xml version="1.0" encoding="utf-8"?>
<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>12345678000123</nrInsc>
    </ideTransmissor>
    <eventos>
      <evento Id="ID1123456780000002018031902284900001">
        <eSocial xmlns="http://www.esocial.gov.br/schema/evt/evtInfoEmpregador/v02_04_01">
          <evtInfoEmpregador Id="ID1123456780000002018031902284900001">
            <ideEvento>
              <tpAmb>2</tpAmb>
              <procEmi>1</procEmi>
              <verProc>1.0</verProc>
            </ideEvento>
            <ideEmpregador>
              <tpInsc>1</tpInsc>
              <nrInsc>12345678</nrInsc>
            </ideEmpregador>
            <infoEmpregador>
              <inclusao>
                <idePeriodo>
                  <iniValid>2016-01</iniValid>
                </idePeriodo>
                <infoCadastro>
                  <nmRazao>NOME DA EMPRESA</nmRazao>
                  <classTrib>01</classTrib>
                  <natJurid>2240</natJurid>
                  <indCoop>0</indCoop>
                  <indConstr>0</indConstr>
                  <indDesFolha>0</indDesFolha>
                  <indOptRegEletron>0</indOptRegEletron>
                  <indEntEd>N</indEntEd>
                  <indEtt>N</indEtt>
                  <contato>
                    <nmCtt>Nome do Contato</nmCtt>
                    <cpfCtt>12345678901</cpfCtt>
                    <foneFixo>1123456789</foneFixo>
                    <email>[email protected]</email>
                  </contato>
                  <softwareHouse>
                    <cnpjSoftHouse>12345678000123</cnpjSoftHouse>
                    <nmRazao>NOME DA EMPRESA</nmRazao>
                    <nmCont>Nome do Contato</nmCont>
                    <telefone>1123456789</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> [...] </DigestValue>
              </Reference>
            </SignedInfo>
            <SignatureValue> [...] </SignatureValue>
            <KeyInfo>
              <X509Data>
                <X509Certificate> [...] </X509Certificate>
              </X509Data>
            </KeyInfo>
          </Signature>
        </eSocial>
      </evento>
    </eventos>
  </envioLoteEventos>
</eSocial>

So you can see what’s wrong in your XML.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.