Webservice REINF Upload - Remote server returned an error: (500) Internal Server Error

Asked

Viewed 901 times

0

I’m trying to communicate with the web service of REINF to submit the contributor information event (R-1000), however I am getting error "(500) Internal Server Error", in the underlying message it says "An error occurred in processing. Please try again. If the problem persists, please contact us through the 'Contact Us' of EFD-REINF..., inform the problem and the number [3033699826]"

Someone’s been through this mistake?
Thanks for your attention.

Below my request and return:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope 
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
   xmlns:sped="http://sped.fazenda.gov.br/">
   <soap:Header></soap:Header>
   <soap:Body>
      <sped:ReceberLoteEventos>
         <sped:loteEventos>
            <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/envioLoteEventos/v1_02_00">
               <loteEventos>
                  <evento id="ID1000000032343842018011517062000001">
                     <Reinf xmlns="http://www.reinf.esocial.gov.br/schemas/evtInfoContribuinte/v1_02_00">
                        <evtInfoContri id="ID1000000032343842018011517062000001">
                           <ideEvento>
                              <tpAmb>2</tpAmb>
                              <procEmi>1</procEmi>
                              <verProc>1.0</verProc>
                           </ideEvento>
                           <ideContri>
                              <tpInsc>1</tpInsc>
                              <nrInsc>03234384</nrInsc>
                           </ideContri>
                           <infoContri>
                              <inclusao>
                                 <idePeriodo>
                                    <iniValid>2018-01</iniValid>
                                 </idePeriodo>
                                 <infoCadastro>
                                    <classTrib>13</classTrib>
                                    <indEscrituracao>1</indEscrituracao>
                                    <indDesoneracao>0</indDesoneracao>
                                    <indAcordoIsenMulta>0</indAcordoIsenMulta>
                                    <indSitPJ>0</indSitPJ>
                                    <contato>
                                       <nmCtt>LUCAS VALFRIDO COSTA.</nmCtt>
                                       <cpfCtt>21513643991</cpfCtt>
                                       <foneFixo>(042)32195250</foneFixo>
                                       <email>[email protected]</email>
                                    </contato>
                                 </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/2001/04/xmldsig-more#rsa-sha256" />
                              <Reference URI="#ID1000000032343842018011517062000001">
                                 <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>KGsEYFOFJVca6JA5MnurDNJOOKXwElCopboz0oXegxg=</DigestValue>
                              </Reference>
                           </SignedInfo>
                           <SignatureValue>DPu5dR...5C1+jgQwbg==</SignatureValue>
                           <KeyInfo>
                              <X509Data>
                                 <X509Certificate>MIIH...E5+J6</X509Certificate>
                              </X509Data>
                           </KeyInfo>
                        </Signature>
                     </Reinf>
                  </evento>
               </loteEventos>
            </Reinf>
         </sped:loteEventos>
      </sped:ReceberLoteEventos>
   </soap:Body>
</soap:Envelope>

Return (Remote server returned an error: (500) Internal Server Error) Detail:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:Client</faultcode>
         <faultstring xml:lang="en-US">Ocorreu um erro no processamento. Por favor tente novamente. Caso o problema persista, favor entrar em contato através do 'Fale Conosco' da EFD - REINF - https://idg.receita.fazenda.gov.br/contato/fale-conosco/empresa/sped/efd-reinf-1 Ao entrar nessa página, clique em 'Indisponibilidade do Sistema', informe o problema e o número [3033699826] e anexe o XML do evento que foi objeto deste erro.</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>

3 answers

1

  • Thank you Pedro, I had taken an example of XML with a version earlier than the current one, unfortunately that wasn’t it, I took another example in the current version and the same error remains, but at least I’m starting from the correct version now. Thank you.

  • Jeison, maybe the problem is in that namespace sped, and these two elements, sped:ReceberLoteEventos and sped:loteEventos, that appear before the first element Reinf. Take this example XML (it is also in a super outdated version, but, you can get an idea of how it should be), it worked at the time it was sent: http://supporte.quarta.com.br/eSocial/arquivos/R1000_EnvioLote.xml

0

NO matter which programming language, framework or lib vc uses, debug the request XML using Postman.

In this question here i explain how to configure and use Postman ( super simple ) and also how to use and configure Fiddler.

Fiddler is for you to monitor the data of the requests your app makes. By intercepting your app requests, you have a chance to compare what was sent against what should have been sent.

Fiddler is useful for capturing application requests that have the functionality you want to implement in your app. Fiddler is basically a Google Chrome/Firefox Inspector with the advantage of capturing request/replay of everything on the computer.

There is also the mitmproxy

REMARKS:

  • Fiddler will only be useful for monitoring requests. While Fiddler is running, all requests will fail to return permission error ( because Fiddler intercepts and re-sends the request WITHOUT authenticating the communication );

  • To debug the answer you have to turn off Fiddler and use Postman. Postman tb will fail if you let Fiddler run.

0

Error 500 usually refers to permissions. Make sure you have permission to access information, folders or directories. See more in the link:

Error 500

  • Thanks Cristy, at first it’s not about permissions. But thanks for the link.

Browser other questions tagged

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