EFD-Reinf - Invalid batch version. Version 1.04.00 should be used

0

I am generating the R-1000 record for sending test in the EFD-Reinf restricted production environment, and I already got help here in the same SOpt: How to consume EFD-Reinf's WebService in C #? (Shipping Events) .

I was able to successfully authenticate and consume the service, but the return of the submitted XML says that the version is invalid:

  

Invalid batch version. Version 1.04.00 should be used.

Being that I point to the new: http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00

I have already researched here in SOpt, including in the post: C # EFD-REINF 1.03.02 - Event signature invalid. Digital signature of XML document is invalid , but I did not find the cause of the problem.

The following XML is unsigned:

<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sped="http://sped.fazenda.gov.br/">
  <soap:Header />
  <soap:Body>
    <REINF xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <loteEventos>
        <evento id="ID1">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="20181121110000000000000001">
              <ideEvento>
                <tpAmb>2</tpAmb>
                <procEmi>1</procEmi>
                <verProc>1.0</verProc>
              </ideEvento>
              <ideContri>
                <tpInsc>1</tpInsc>
                <nrInsc>01628604</nrInsc>
              </ideContri>
              <infoContri>
                <inclusao>
                  <idePeriodo>
                    <iniValid>2018-01</iniValid>
                  </idePeriodo>
                  <infoCadastro>
                    <classTrib>99</classTrib>
                    <indEscrituracao>1</indEscrituracao>
                    <indDesoneracao>0</indDesoneracao>
                    <indAcordoIsenMulta>0</indAcordoIsenMulta>
                    <indSitPJ>0</indSitPJ>
                    <contato>
                      <nmCtt>XXXX</nmCtt>
                      <cpfCtt>XXX</cpfCtt>
                      <foneFixo>(011)XXXX6427</foneFixo>
                      <email>XXXXX</email>
                    </contato>
                  </infoCadastro>
                </inclusao>
              </infoContri>
            </evtInfoContri>
          </Reinf>
        </evento>
      </loteEventos>
    </REINF>
  </soap:Body>
</soap:Envelope>

XML with signature:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sped="http://sped.fazenda.gov.br/">
  <soap:Header />
  <soap:Body>
    <REINF xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <loteEventos>
        <evento id="ID1">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="20181121110000000000000001">
              <ideEvento>
                <tpAmb>2</tpAmb>
                <procEmi>1</procEmi>
                <verProc>1.0</verProc>
              </ideEvento>
              <ideContri>
                <tpInsc>1</tpInsc>
                <nrInsc>01628604</nrInsc>
              </ideContri>
              <infoContri>
                <inclusao>
                  <idePeriodo>
                    <iniValid>2018-01</iniValid>
                  </idePeriodo>
                  <infoCadastro>
                    <classTrib>99</classTrib>
                    <indEscrituracao>1</indEscrituracao>
                    <indDesoneracao>0</indDesoneracao>
                    <indAcordoIsenMulta>0</indAcordoIsenMulta>
                    <indSitPJ>0</indSitPJ>
                    <contato>
                      <nmCtt>xxx</nmCtt>
                      <cpfCtt>xxx</cpfCtt>
                      <foneFixo>(011)xxx</foneFixo>
                      <email>xxxx</email>
                    </contato>
                  </infoCadastro>
                </inclusao>
              </infoContri>
            </evtInfoContri>
          </Reinf>
        </evento>
      </loteEventos>
    </REINF>
  </soap:Body>
  <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>Mv9GEVe2dZ4zstZhfcp0xok3OHolN5kjUNtMDvG1uF4=</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>DUE7Q+LguONd8cDbPZHqC9ObqG51Um5Oh4v7I5fMw43zIQQeeMbhF2j1GrbKg0poFW134OUB1dFXZyXMEQ/ynrNXkRXT1zZAXgQ0jFtfUA6MIjDCUoE68Q/bNDG7N28A1loXqAILKMmVr8WGg73UA9rDU9wMTTWy9yOfN712yqFA5RJzp53wpVX6BmjC05lfRblslEcSZTvQg2QbgLh+FBRIubznVn+sFuZ5hAB6QggCumSyxVBrpeLPyvlpSPvQM2xHw4IO3bFSq2BqPHSePU3lLyl+8/irlOLUGYSSX77m8hmBOpKzmqBqjX+v8E6QLHLEUpXcN0HT3Y5bGMByrQ==</SignatureValue>
    <KeyInfo>
      <X509Data>
        <X509Certificate>MIIHqzCCBZOgAwIBAgIIXu2i7LwvfWswDQYJKoZIhvcNAQELBQAwdTELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxNjA0BgNVBAsMLVNlY3JldGFyaWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCAtIFJGQjEZMBcGA1UEAwwQQUMgU0VSQVNBIFJGQiB2NTAeFw0xODA0MDUxNDEzMDBaFw0xOTA0MDUxNDEzMDBaMIHpMQswCQYDVQQGEwJCUjELMAkGA1UECAwCU1AxEjAQBgNVBAcMCVNBTyBQQVVMTzETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMRYwFAYDVQQLDA1SRkIgZS1DTlBKIEExMRIwEAYDVQQLDAlBUiBTRVJBU0ExQDA+BgNVBAMMN1NFUkJPTSBBUk1BWkVOUyBHRVJBSVMgRlJJR09SSUZJQ09TIExUREE6MDE2Mjg2MDQwMDAxNDAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCOnWMGJ7BUp1dnOdabMln8lfSsj/m4zOG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KoEigRoZEaHR0cDovL3d3dy5jZXJ0aWZpY2Fkb2RpZ2l0YWwuY29tLmJyL3JlcG9zaXRvcmlvL2xjci9zZXJhc2FyZmJ2NS5jcmwwRKBCoECGPmh0dHA6Ly9sY3IuY2VydGlmaWNhZG9zLmNvbS5ici9yZXBvc2l0b3Jpby9sY3Ivc2VyYXNhcmZidjUuY3JsMA4GA1UdDwEB/wQEAwIF4DANBgkqhkiG9w0BAQsFAAOCAgEAQw2Mx0UHeMMxcpnKV2GJNwn18GVC1yXNPkV7c79DQvY+BgvbcnK6rV94hnnHzOjEs4hn9b8J9Mf53IGYgRGpErVELC/ddrOu9ZiqtulsFKC24YMXugtYaikzK4oUHrDD83ZptwTgyO1ZS1C/rUuIfwpi4+KCO7IORBaTghNHf+ficpR3oSebJ64mwbJQfeCfHadFr1kbGOjZeh4flD1Qp2Nzzmx6QI51PuDFpyYmjej9T2WuC/UhhaTwffwM2dpqAIHASSjinAjeb9JC9v6ZJhMZ210sPVut0/xkdPMQSXDiyljlle9Iymk7R4DC+cO1DbrHlliedvKUF2fJJjfvqxQ5ZRm1EngV69TqfPz/32tHjOpum86QCm/hzn+aEuZ+2R2XWEVvJSB1m4ckm/A2N8C2zyha+a9GMgZyouWQ3MDwAOR0dIzkV+85rGM7Thg1D9CQoDkq7LExZze20ROvaLcg0RbcJLCu4kSSpUM1mb8x2uPa2ExmSz/CniRSLx+LJSaq2vYNuK5LrOiw7cOy7aSUTU4tu4jCimaCB6EN3wzgKxzaGHGQcjI4aiuhssM0iH4sMNUKhcadCLRoxeXKQBgBKn1Ab3uANfLdHxrCxGcoPhsBfztX2xzMpk+rHnD849yRnE3OWGwrBVRz38T7jA1cJ9s/fJz1agg8VASmYv4=</X509Certificate>
      </X509Data>
    </KeyInfo>
  </Signature>
</soap:Envelope>

The full return XML:

<Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00">
  <retornoLoteEventos id="IDCE8ED92E6A9124FCD401AFF46756541E">
    <ideTransmissor>
      <IdTransmissor>01628604000140</IdTransmissor>
    </ideTransmissor>
    <status>
      <cdStatus>1</cdStatus>
      <descRetorno>ERRO</descRetorno>
      <dadosRegistroOcorrenciaLote>
        <ocorrencias>
          <tipo>1</tipo>
          <codigo>MS0092</codigo>
          <descricao>Versão do lote inválida. Deve ser utilizada a versão 1.04.00.</descricao>
        </ocorrencias>
      </dadosRegistroOcorrenciaLote>
    </status>
  </retornoLoteEventos>
  <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="#IDCE8ED92E6A9124FCD401AFF46756541E">
        <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>gRHi6NxvLDuhFO2Q2jB+Nl7B450LCzRynii+Mo10ZWE=</DigestValue>
      </Reference>
    </SignedInfo>
    <SignatureValue>CmbAd77rYGrwWkFSw+Hx4BqnbV7bgjGfnnw2Y1TkQt1HYJIjoe7JcjBO8v/BFmg0vzHMU4CLr4GuryhMFFP1m6ED/OhAbH1DAqwmPITypfSnLTZno5ILgxtV1mxic88oYY3VebPZnAeINg7OK1u+J3tQMmpEuTx0ew7kY5wIFOW+Fa2bUQXGRqrLP2r5C7Gmt+b/Z0mHxLAaeb/qwdhxqnyDVuCayFo93dI5rREP9WgQhTijwRv8k0uBQ94bOzv12kcF15w00rg3F/1bo6Vy8iSzFc9OtEl0C5tUMC765QnfFChdWdkT9BtQwVnKiOHTGISixa9EHpzjEv24cGvrPA==</SignatureValue>
    <KeyInfo>
      <X509Data>
        <X509Certificate>MIIHcTCCBVmgAwIBAgIDAvA9MA0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homfDxVhYgbHAjRpu9ItAomguKx82YJVUenHy7Oyi6u+QBOQZZuBnCrLgUDKqXKwGSh0qEI5m0uTZ9JE/MYMsJkr+iBUa9cM9r2UBwEslbzu4k6xrCCTawCoyMpd+LolKDLtl4gdveF7gzpBMyX90xT/TsqOhV94WRLLdcYEAAbpv+S+BaCPUXcEkD/1gWygQW5/P+jV88dAKLzL5lBX7k7pywZg27IXSB4IDUUJexCRpMehubTLG9gK9ua9JKmhHgNFCnche8+IrUyuFeyxUuLB0/4GJ152gsYlRdQs69GgzZa2YIEoo7dgw7vskTY9LVyvqybTY2MBzh+Wn0ktFwnkCSdyXegloQxWQqaakpzCwCo3tJPUDdU6EA2w==</X509Certificate>
      </X509Data>
    </KeyInfo>
  </Signature>
</Reinf>

EDITION You are right, I did not realize that the signature should be by event and not by batch.

About "The right shape of your soap: Envelope should be this": I did the editing as indicated but still returning the same wrong batch message:

{<Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00">
  <retornoLoteEventos id="ID54ED726E636E2B6F9FD4FD7077870873">
    <ideTransmissor>
      <IdTransmissor>01628604000140</IdTransmissor>
    </ideTransmissor>
    <status>
      <cdStatus>1</cdStatus>
      <descRetorno>ERRO</descRetorno>
      <dadosRegistroOcorrenciaLote>
        <ocorrencias>
          <tipo>1</tipo>
          <codigo>MS0092</codigo>
          <descricao>Versão do lote inválida. Deve ser utilizada a versão 1.04.00.</descricao>
        </ocorrencias>
      </dadosRegistroOcorrenciaLote>
    </status>
  </retornoLoteEventos>
  <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="#ID54ED726E636E2B6F9FD4FD7077870873">
        <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>PkXxGAtPdkWYgZ21TLotsVYYE7mPLGnmpmLMXI65gnQ=</DigestValue>
      </Reference>
    </SignedInfo>
     [...]</SignatureValue>
    <KeyInfo>
      <X509Data>
        <X509Certificate> [...]</X509Certificate>
      </X509Data>
    </KeyInfo>
  </Signature>
</Reinf>}
    BaseUri: ""
    Document: null
    FirstAttribute: {xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00"}
    FirstNode: {<retornoLoteEventos id="ID54ED726E636E2B6F9FD4FD7077870873" xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00">
  <ideTransmissor>
    <IdTransmissor>01628604000140</IdTransmissor>
  </ideTransmissor>
  <status>
    <cdStatus>1</cdStatus>
    <descRetorno>ERRO</descRetorno>
    <dadosRegistroOcorrenciaLote>
      <ocorrencias>
        <tipo>1</tipo>
        <codigo>MS0092</codigo>
        <descricao>Versão do lote inválida. Deve ser utilizada a versão 1.04.00.</descricao>
      </ocorrencias>
    </dadosRegistroOcorrenciaLote>
  </status>
</retornoLoteEventos>}
    HasAttributes: true
    HasElements: true
    IsEmpty: false
    LastAttribute: {xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00"}
    LastNode: {<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="#ID54ED726E636E2B6F9FD4FD7077870873">
      <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>PkXxGAtPdkWYgZ21TLotsVYYE7mPLGnmpmLMXI65gnQ=</DigestValue>
    </Reference>
  </SignedInfo>
  <SignatureValue>NaDYeZv3gFDBH41BY5j8hcYXHhpdx+hjFWCIYvLaBxAVWNUUaAZixzV3Bld4Lul3m0yKL6Hq16xmKYiA55tCPbZWWy+YymnCtj3OC7rZPv2lQZZyTK6DiLugIIiUyk7TsTd1rZmT6D55OxwJfpmb1M+rQLK6siYAZmI2pguUX0NvKITIaaxUD6HGZOgO6cc9VGRR7PTxjhkl0j0jcwFPxCEvk8cTbT0PnkkLw1v5zPBC1nvgpz3Kn+fG11qkTwEIIdNonx/O1i7ZdvpLUe7/MXEYNbip/lcrGL/zapBHNTsLgN6NNI7QUUuPIPB4yMhpQcNA9FfzEgzdZVhbDzdLeQ==</SignatureValue>
  <KeyInfo>
    <X509Data>
      <X509Certificate> [...]</X509Certificate>
    </X509Data>
  </KeyInfo>
</Signature>}
    Name: {{http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00}Reinf}
    NextNode: null
    NodeType: Element
    Parent: null
    PreviousNode: null
    Value: "016286040001401ERRO1MS0092Versão do lote inválida. Deve ser utilizada a versão 1.04.00.PkXxGAtPdkWYgZ21TLotsVYYE7mPLGnmpmLMXI65gnQ=NaDYeZv3gFDBH41BY5j8hcYXHhpdx+hjFWCIYvLaBxAVWNUUaAZixzV3Bld4Lul3m0yKL6Hq16xmKYiA55tCPbZWWy+YymnCtj3OC7rZPv2lQZZyTK6DiLugIIiUyk7TsTd1rZmT6D55OxwJfpmb1M+rQLK6siYAZmI2pguUX0NvKITIaaxUD6HGZOgO [...]"

I can not post my XML here by character limiting.

    
asked by anonymous 21.11.2018 / 18:10

1 answer

1

XML is case-sensitive ), and you called the batch root element as <REINF> , but the XSD schema says the name should be% with%. Change this and see if it works out.

References:

EDITION

I had not noticed at first, but the problem is in the signature. Here's another answer that talks about this: XML signature error for EFD-Reinf .

But basically, your R-1000 event should look like this, with the signature built in from it:

      <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
        <evtInfoContri id="20181121110000000000000001">
            [...]
        </evtInfoContri>
        <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
            [...]
        </Signature>            
      </Reinf>

You are putting the signature after <Reinf> , which is wrong :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sped="http://sped.fazenda.gov.br/">
  <soap:Header />
  <soap:Body>
    <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <loteEventos>
        <evento id="ID1">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="20181121110000000000000001">
              [...]
            </evtInfoContri>
          </Reinf>
        </evento>
      </loteEventos>
    </REINF>
  </soap:Body>
  <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    [...]
  </Signature>
</soap:Envelope>

The correct form of your soap:Body should be this:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sped="http://sped.fazenda.gov.br/">
  <soap:Header />
  <soap:Body>
    <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <loteEventos>
        <evento id="ID1">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="20181121110000000000000001">
              [...]
            </evtInfoContri>
            <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
              [...]
            </Signature>
          </Reinf>
        </evento>
      </loteEventos>
    </REINF>
  </soap:Body>
</soap:Envelope>
    
21.11.2018 / 18:55