Ir para conteúdo
  • Cadastre-se

dev botao

  • Este tópico foi criado há 2185 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Postado

Bom dia a todos.

Estou desenvolvendo uma aplicação para enviar os registros do Reinf, porém não estou conseguindo identificar o erro ao gerar o R-1000.
Podem me ajudar? Já comparei com diversos xml's e não consigo identificar o erro.

Envio:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <LoteEventos>
        <evento id="ID1008298160000002018103111111500001">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="ID1008298160000002018103111111500001">
              <ideEvento>
                <tpAmb>2</tpAmb>
                <procEmi>1</procEmi>
                <verProc>1.0</verProc>
              </ideEvento>
              <ideContri>
                <tpInsc>1</tpInsc>
                <nrInsc>00829816</nrInsc>
              </ideContri>
              <infoContri>
                <inclusao>
                  <idePeriodo>
                    <iniValid>2018-10</iniValid>
                    <fimValid>2020-10</fimValid>
                  </idePeriodo>
                  <infoCadastro>
                    <classTrib>01</classTrib>
                    <indEscrituracao>1</indEscrituracao>
                    <indDesoneracao>0</indDesoneracao>
                    <indAcordoIsenMulta>0</indAcordoIsenMulta>
                    <contato>
                      <nmCtt>NOMTE DE CONTATO TESTE</nmCtt>
                      <cpfCtt>00000000000</cpfCtt>
                      <foneFixo>0929999990</foneFixo>
                      <foneCel>9999999990</foneCel>
                      <email>[email protected]</email>
                    </contato>
                    <softHouse>
                      <cnpjSoftHouse>99999999999999</cnpjSoftHouse>
                      <nmRazao>EMPRESA DE TESTE</nmRazao>
                      <nmCont>NOME DE TESTE</nmCont>
                      <telefone>9999999991</telefone>
                      <email>[email protected]</email>
                    </softHouse>
                    <infoEFR>
                      <ideEFR>S</ideEFR>
                    </infoEFR>
                  </infoCadastro>
                </inclusao>
              </infoContri>
            </evtInfoContri>
            <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="#ID1008298160000002018103111111500001">
                  <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>uWz2YF6jpAklTq3tJduVlisYRew=</DigestValue>
                </Reference>
              </SignedInfo>
              <SignatureValue>KBzxoWZh9bkUZib9d5F5rFBwi/wccCtzgCwkl8RVJEq1fuCHKfd6FZHUVZi1Q47+sAyskl82g/3a+DmvZpXrNw/AxaU0Mg05VZpsnQd+2g4ubSJXKC4yWPaz7MnsBHo4WeNwIsHNkzNVn/gFwkE1x9wkYx9XyYjyMd0RF7nAAxevC5fux+T0V63+jF5rJdFlKd0UAItB5bDVdFzZ14dgklSI5W+32W5keD8HwaF4QaE3ZHMmNF9zfc3IJlrC0Cd3j3MTe6RhThNlBlBjuE61wwDjqt/iGuE5M3VVEY652jzFnrwaXTXMtPZKPuLg9tLNU94wbPcqyV6UJ177wSy4xQ==</SignatureValue>
              <KeyInfo>
                <X509Data>
                  <X509Certificate>MIIHoTCCBYmgAwIBAgIIYCyQb2EDxmswDQYJKoZIhvcNAQELBQAwdTELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxNjA0BgNVBAsMLVNlY3JldGFyaWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCAtIFJGQjEZMBcGA1UEAwwQQUMgU0VSQVNBIFJGQiB2NTAeFw0xODAzMTkxNjIyMDBaFw0xOTAzMTkxNjIyMDBaMIHaMQswCQYDVQQ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gwZVb3INqxLprguynm8pr/Dq6ZcaWcwhJo+EbIewrOUlD4P87XJQyNQKa7Ktuud1UdGj0CJuXJ8RfmE8OXzYlr/xSB00ldsQ5fMQ4m51cNxBIg6sn+nI1Y7w9TyjcgalbGwqJ2J8hW7ddHs970M4zOj5ENrwvLVoA/pMwI2We7nR7KQnrVzQSqbss1oodoS7BfAZ9Cb7mA8lnQ8nmOam8Qze4XfsXwK1QA==</X509Certificate>
                </X509Data>
              </KeyInfo>
            </Signature>
          </Reinf>
        </evento>
      </LoteEventos>
    </Reinf>
  </soap:Body>
</soap:Envelope>

 

Retorno:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <ReceberLoteEventosResponse xmlns="http://sped.fazenda.gov.br/">
      <ReceberLoteEventosResult>
        <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00">
          <retornoLoteEventos id="IDE2ED955BB1C7A81D2153656CB521688F">
            <ideTransmissor>
              <IdTransmissor>00000000000000</IdTransmissor>
            </ideTransmissor>
            <status>
              <cdStatus>1</cdStatus>
              <descRetorno>ERRO</descRetorno>
              <dadosRegistroOcorrenciaLote>
                <ocorrencias>
                  <tipo>1</tipo>
                  <codigo>MS0028</codigo>
                  <descricao>Lote inválido.</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="#IDE2ED955BB1C7A81D2153656CB521688F">
                <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>RQt6WivfPtOkiGthEiyu/VtUnhm/0MG/h+wRc58N9+s=</DigestValue>
              </Reference>
            </SignedInfo>
            <SignatureValue>eIRtpqf15L7TtGM4vkEU2JBHZ3JB8elvJiJ/CklTAcWBTyiV07VTkUNM41UpJhSid6gKGp3kE72O50q/TnPQ4nSW7+8JUjTPnBHEXiJ9H7wtUQH0/qIlznUxNPloosyKxPv3tQxvA8hiQlobxQM8Of8ztd05JmxIfomnklXFeSU8SKqwLIO/c1kDGE88wOl7+Xv95IZxaMD+ROOSKasZt96BDZfaFq9E0qogNiEcXQVJHc55i38W/WtagCROQovNJDSORygbu95M5FC7DygGNL/jarnjTTKh31mw9FCzUCKWXmCyoqalSkhSNBnq3gtfbwi5izmr8oDCItLwbrCvMA==</SignatureValue>
            <KeyInfo>
              <X509Data>
                <X509Certificate>MIIHcTCCBVmgAwIBAgIDAvA9MA0GCSqGSIb3DQEBCwUAMIGOMQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMTIwMAYDVQQDDClBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgZG8gU0VSUFJPUkZCIFNTTDAeFw0xODA5MDQxNzA5NDhaFw0xOTA5MDQxNzA5NDhaMIG6MQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMREwDwYDVQQLDAhBUlNFUlBSTzEaMBgGA1UECwwRUkZCIGUtU2Vydmlkb3IgQTExLzAtBgNVBAMMJnByZXByb2RlZmRyZWluZi5yZWNlaXRhLmZhemVuZGEuZ292LmJyMIIBIjAN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AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwoCIGBWBMAQMCoBkEF0VEVUFSRE8gWU9TSElEQSBTQUxPTUFPoBkGBWBMAQMDoBAEDjMzNjgzMTExMDAwMTA3gR1lZHVhcmRvLnlvc2hpZGFAc2VycHJvLmdvdi5icjAOBgNVHQ8BAf8EBAMCBeAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQCL7xXh7bEYe42U/5oPfChSDLIEcsV4I4io/pAQBhtzf8UqCptT3aj2zWskg04BY10Xuq0UyE+pzInF6ulD4R4C1ee4bIkq84I4mq/cOx4HoIVZTq2j9F2NVSOJt87MxvUdSASPqiWj9qEvOpv/KopW8MJBRD35PvukwsHeiMlEKv5oMCa0mRUqrhWXVRYPeSjrBUbkRVNHGeUPH0if0N/uctlX8ecwGWD73fFbfrmSI+wkfmWxmEWdouu0pQXy/2A4KsODxc/CDUfM+61DJWC8mNKTVy1sae6W9wx8/uCY9lFsU5homfDxVhYgbHAjRpu9ItAomguKx82YJVUenHy7Oyi6u+QBOQZZuBnCrLgUDKqXKwGSh0qEI5m0uTZ9JE/MYMsJkr+iBUa9cM9r2UBwEslbzu4k6xrCCTawCoyMpd+LolKDLtl4gdveF7gzpBMyX90xT/TsqOhV94WRLLdcYEAAbpv+S+BaCPUXcEkD/1gWygQW5/P+jV88dAKLzL5lBX7k7pywZg27IXSB4IDUUJexCRpMehubTLG9gK9ua9JKmhHgNFCnche8+IrUyuFeyxUuLB0/4GJ152gsYlRdQs69GgzZa2YIEoo7dgw7vskTY9LVyvqybTY2MBzh+Wn0ktFwnkCSdyXegloQxWQqaakpzCwCo3tJPUDdU6EA2w==</X509Certificate>
              </X509Data>
            </KeyInfo>
          </Signature>
        </Reinf>
      </ReceberLoteEventosResult>
    </ReceberLoteEventosResponse>
  </s:Body>
</s:Envelope>

 

  • Moderadores
Postado
14 minutos atrás, miojow disse:

Bom dia a todos.

Estou desenvolvendo uma aplicação para enviar os registros do Reinf, porém não estou conseguindo identificar o erro ao gerar o R-1000.
Podem me ajudar? Já comparei com diversos xml's e não consigo identificar o erro.

Envio:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header/>
  <soap:Body>
    <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_04_00">
      <LoteEventos>
        <evento id="ID1008298160000002018103111111500001">
          <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_04_00">
            <evtInfoContri id="ID1008298160000002018103111111500001">
              <ideEvento>
                <tpAmb>2</tpAmb>
                <procEmi>1</procEmi>
                <verProc>1.0</verProc>
              </ideEvento>
              <ideContri>
                <tpInsc>1</tpInsc>
                <nrInsc>00829816</nrInsc>
              </ideContri>
              <infoContri>
                <inclusao>
                  <idePeriodo>
                    <iniValid>2018-10</iniValid>
                    <fimValid>2020-10</fimValid>
                  </idePeriodo>
                  <infoCadastro>
                    <classTrib>01</classTrib>
                    <indEscrituracao>1</indEscrituracao>
                    <indDesoneracao>0</indDesoneracao>
                    <indAcordoIsenMulta>0</indAcordoIsenMulta>
                    <contato>
                      <nmCtt>NOMTE DE CONTATO TESTE</nmCtt>
                      <cpfCtt>00000000000</cpfCtt>
                      <foneFixo>0929999990</foneFixo>
                      <foneCel>9999999990</foneCel>
                      <email>[email protected]</email>
                    </contato>
                    <softHouse>
                      <cnpjSoftHouse>99999999999999</cnpjSoftHouse>
                      <nmRazao>EMPRESA DE TESTE</nmRazao>
                      <nmCont>NOME DE TESTE</nmCont>
                      <telefone>9999999991</telefone>
                      <email>[email protected]</email>
                    </softHouse>
                    <infoEFR>
                      <ideEFR>S</ideEFR>
                    </infoEFR>
                  </infoCadastro>
                </inclusao>
              </infoContri>
            </evtInfoContri>
            <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="#ID1008298160000002018103111111500001">
                  <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>uWz2YF6jpAklTq3tJduVlisYRew=</DigestValue>
                </Reference>
              </SignedInfo>
              <SignatureValue>KBzxoWZh9bkUZib9d5F5rFBwi/wccCtzgCwkl8RVJEq1fuCHKfd6FZHUVZi1Q47+sAyskl82g/3a+DmvZpXrNw/AxaU0Mg05VZpsnQd+2g4ubSJXKC4yWPaz7MnsBHo4WeNwIsHNkzNVn/gFwkE1x9wkYx9XyYjyMd0RF7nAAxevC5fux+T0V63+jF5rJdFlKd0UAItB5bDVdFzZ14dgklSI5W+32W5keD8HwaF4QaE3ZHMmNF9zfc3IJlrC0Cd3j3MTe6RhThNlBlBjuE61wwDjqt/iGuE5M3VVEY652jzFnrwaXTXMtPZKPuLg9tLNU94wbPcqyV6UJ177wSy4xQ==</SignatureValue>
              <KeyInfo>
                <X509Data>
                  <X509Certificate>MIIHoTCCBYmgAwIBAgIIYCyQb2EDxmswDQYJKoZIhvcNAQELBQAwdTELMAkGA1UEBhMCQlIxEzARBgNVBAoMCklDUC1CcmFzaWwxNjA0BgNVBAsMLVNlY3JldGFyaWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCAtIFJGQjEZMBcGA1UEAwwQQUMgU0VSQVNBIFJGQiB2NTAeFw0xODAzMTkxNjIyMDBaFw0xOTAzMTkxNjIyMDBaMIHaMQswCQYDVQQGEwJCUjELMAkGA1UECAwCUlMxFTATBgNVBAcMDFBPUlRPIEFMRUdSRTETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNla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7w9TyjcgalbGwqJ2J8hW7ddHs970M4zOj5ENrwvLVoA/pMwI2We7nR7KQnrVzQSqbss1oodoS7BfAZ9Cb7mA8lnQ8nmOam8Qze4XfsXwK1QA==</X509Certificate>
                </X509Data>
              </KeyInfo>
            </Signature>
          </Reinf>
        </evento>
      </LoteEventos>
    </Reinf>
  </soap:Body>
</soap:Envelope>

 

Retorno:


<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <ReceberLoteEventosResponse xmlns="http://sped.fazenda.gov.br/">
      <ReceberLoteEventosResult>
        <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/retornoLoteEventos/v1_04_00">
          <retornoLoteEventos id="IDE2ED955BB1C7A81D2153656CB521688F">
            <ideTransmissor>
              <IdTransmissor>00000000000000</IdTransmissor>
            </ideTransmissor>
            <status>
              <cdStatus>1</cdStatus>
              <descRetorno>ERRO</descRetorno>
              <dadosRegistroOcorrenciaLote>
                <ocorrencias>
                  <tipo>1</tipo>
                  <codigo>MS0028</codigo>
                  <descricao>Lote inválido.</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="#IDE2ED955BB1C7A81D2153656CB521688F">
                <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>RQt6WivfPtOkiGthEiyu/VtUnhm/0MG/h+wRc58N9+s=</DigestValue>
              </Reference>
            </SignedInfo>
            <SignatureValue>eIRtpqf15L7TtGM4vkEU2JBHZ3JB8elvJiJ/CklTAcWBTyiV07VTkUNM41UpJhSid6gKGp3kE72O50q/TnPQ4nSW7+8JUjTPnBHEXiJ9H7wtUQH0/qIlznUxNPloosyKxPv3tQxvA8hiQlobxQM8Of8ztd05JmxIfomnklXFeSU8SKqwLIO/c1kDGE88wOl7+Xv95IZxaMD+ROOSKasZt96BDZfaFq9E0qogNiEcXQVJHc55i38W/WtagCROQovNJDSORygbu95M5FC7DygGNL/jarnjTTKh31mw9FCzUCKWXmCyoqalSkhSNBnq3gtfbwi5izmr8oDCItLwbrCvMA==</SignatureValue>
            <KeyInfo>
              <X509Data>
                <X509Certificate>MIIHcTCCBVmgAwIBAgIDAvA9MA0GCSqGSIb3DQEBCwUAMIGOMQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMTIwMAYDVQQDDClBdXRvcmlkYWRlIENlcnRpZmljYWRvcmEgZG8gU0VSUFJPUkZCIFNTTDAeFw0xODA5MDQxNzA5NDhaFw0xOTA5MDQxNzA5NDhaMIG6MQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMREwDwYDVQQLDAhBUlNFUlBSTzEaMBgGA1UECwwRUkZCIGUtU2Vydmlkb3IgQTExLzAtBgNVBAMMJnByZXByb2RlZmRyZWluZi5yZWNlaXRhLmZhemVuZGEuZ292LmJyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq+gp3NABZzSp4S1I7c6lgJXp1NgCOjHKn5OMxisk68fuHbhj1eyzfSMkc281ecF0uCmW+Fwyz7wnwRvS/VD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gR1lZHVhcmRvLnlvc2hpZGFAc2VycHJvLmdvdi5icjAOBgNVHQ8BAf8EBAMCBeAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQCL7xXh7bEYe42U/5oPfChSDLIEcsV4I4io/pAQBhtzf8UqCptT3aj2zWskg04BY10Xuq0UyE+pzInF6ulD4R4C1ee4bIkq84I4mq/cOx4HoIVZTq2j9F2NVSOJt87MxvUdSASPqiWj9qEvOpv/KopW8MJBRD35PvukwsHeiMlEKv5oMCa0mRUqrhWXVRYPeSjrBUbkRVNHGeUPH0if0N/uctlX8ecwGWD73fFbfrmSI+wkfmWxmEWdouu0pQXy/2A4KsODxc/CDUfM+61DJWC8mNKTVy1sae6W9wx8/uCY9lFsU5homfDxVhYgbHAjRpu9ItAomguKx82YJVUenHy7Oyi6u+QBOQZZuBnCrLgUDKqXKwGSh0qEI5m0uTZ9JE/MYMsJkr+iBUa9cM9r2UBwEslbzu4k6xrCCTawCoyMpd+LolKDLtl4gdveF7gzpBMyX90xT/TsqOhV94WRLLdcYEAAbpv+S+BaCPUXcEkD/1gWygQW5/P+jV88dAKLzL5lBX7k7pywZg27IXSB4IDUUJexCRpMehubTLG9gK9ua9JKmhHgNFCnche8+IrUyuFeyxUuLB0/4GJ152gsYlRdQs69GgzZa2YIEoo7dgw7vskTY9LVyvqybTY2MBzh+Wn0ktFwnkCSdyXegloQxWQqaakpzCwCo3tJPUDdU6EA2w==</X509Certificate>
              </X509Data>
            </KeyInfo>
          </Signature>
        </Reinf>
      </ReceberLoteEventosResult>
    </ReceberLoteEventosResponse>
  </s:Body>
</s:Envelope>

 

Bom dia, miojow.

Verifique os campos abaixo:

- Verifique o Id do evento, você deve informar os primeiros 8 Dígitos do CNPJ e completar o resto com 0 a direita;

- nrInsc deve informar os primeiros 8 Dígitos do CNPJ.

Equipe ACBr

Felipe Eduardo Resende Mesquita

Ajude o Projeto ACBr crescer - Assine o SAC

Projeto ACBr     Telefone:(15) 2105-0750 WhatsApp(15)99790-2976.

 

 

 

Postado
7 minutos atrás, Felipe E. Resende Mesquita disse:

Bom dia, miojow.

Verifique os campos abaixo:

- Verifique o Id do evento, você deve informar os primeiros 8 Dígitos do CNPJ e completar o resto com 0 a direita;

- nrInsc deve informar os primeiros 8 Dígitos do CNPJ.

 

Bom dia, Felipe.

Já verifiquei. 00829816 são os 8 primeiros dígitos do CNPJ. Completei com 0 a direita na ID até fechar os 14 Dígitos.

Segue abaixo o envelopamento e envio para melhor compreensão:

        public void TransmitirArquivoWebservice(string xml)
        {
            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("https://preprodefdreinf.receita.fazenda.gov.br/WsREINF/RecepcaoLoteReinf.svc");
            webRequest.Headers.Add("SOAPAction", @"http://sped.fazenda.gov.br/RecepcaoLoteReinf/ReceberLoteEventos");
            webRequest.ContentType = "text/xml;charset=\"utf-8\"";
            webRequest.Accept = "text/xml";
            webRequest.Method = "POST";
            webRequest.ClientCertificates.Add(this.certificado);

            XmlDocument soapEnvelopeXml = new XmlDocument();
            soapEnvelopeXml.LoadXml(xml);
            soapEnvelopeXml.RemoveChild(soapEnvelopeXml.FirstChild);

            string soap = string.Format(@"<soap:Envelope xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">
            <soap:Header/>
            <soap:Body>
            {0}
            </soap:Body>
            </soap:Envelope>", soapEnvelopeXml.InnerXml);
            
            soapEnvelopeXml.LoadXml(soap);

            using (Stream stream = webRequest.GetRequestStream())
            {
                soapEnvelopeXml.Save(stream);
            }

            try
            {
                using (WebResponse response = webRequest.GetResponse()) 
                {
                    using (StreamReader rd = new StreamReader(response.GetResponseStream()))
                    {
                        string soapResult = rd.ReadToEnd();
                        Console.WriteLine(soapResult);
                    }
                }
            }

            catch(Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

 

  • 1 mês depois ...
  • Administradores
Postado

Boa tarde.

Este tópico está inativo a algum tempo e por isso será fechado, caso necessário favor criar um novo tópico.

Att.

Consultora SAC ACBr

Juliana Tamizou

Gerente de Projetos ACBr / Diretora de Marketing AFRAC
Ajude o Projeto ACBr crescer - Seja Pro

Projeto ACBr     Telefone:(15) 2105-0750 WhatsApp(15)99790-2976.  Discord

Projeto ACBr - A maior comunidade Open Source de Automação Comercial do Brasil


Participe de nosso canal no Discord e fique ainda mais próximo da Comunidade !!

  • Este tópico foi criado há 2185 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.
Visitante
Este tópico está agora fechado para novas respostas
×
×
  • Criar Novo...

Informação Importante

Colocamos cookies em seu dispositivo para ajudar a tornar este site melhor. Você pode ajustar suas configurações de cookies, caso contrário, assumiremos que você está bem para continuar.

The popup will be closed in 10 segundos...