Jump to content

dev botao

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

Recommended Posts

Posted

Boa Noite Pessoal,

 

Estou abrindo este tópico pois pesquisei no fórum e não encontrei alguém com esse problema.

 

Quando tento efetuar o cancelamento de uma NFC-e (homologação), recebo a mensagem de erro Argument out of range. Depurando o processo de cancelamento do componente (envio do evento), a variável RetornoWS da rotina EnviarDadosWebService na unit ACBrNFeWebServices está recebendo o seguinte conteúdo (colei aqui pois não consegui anexar):

'<html>'#$D#$A'    <head>'#$D#$A'        <title>Runtime Error</title>'#$D#$A'        <style>'#$D#$A'         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} '#$D#$A'         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}'#$D#$A'         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}'#$D#$A'         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }'#$D#$A'         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }'#$D#$A'         pre {font-family:"Lucida Console";font-size: .9em}'#$D#$A'         .marker {font-weight: bold; color: black;text-decoration: none;}'#$D#$A'         .version {color: gray;}'#$D#$A'         .error {margin-bottom: 10px;}'#$D#$A'         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }'#$D#$A'        </style>'#$D#$A'    </head>'#$D#$A#$D#$A'    <body bgcolor="white">'#$D#$A#$D#$A'            <span><H1>Server Error in ''/WS/RecepcaoEvento'' Application.<hr width=100% size=1 color=silver></H1>'#$D#$A#$D#$A'            <h2> <i>Runtime Error</i> </h2></span>'#$D#$A#$D#$A'            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">'#$D#$A#$D#$A'            <b> Description: </b>An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.'#$D#$A'            <br><br>'#$D#$A#$D#$A'            <b>Details:</b> To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".<br><br>'#$D#$A#$D#$A'            <table width=100% bgcolor="#ffffcc">'#$D#$A'               <tr>'#$D#$A'                  <td>'#$D#$A'                      <code><pre>'#$D#$A#$D#$A'<!-- Web.Config Configuration File -->'#$D#$A#$D#$A'<configuration>'#$D#$A'    <system.web>'#$D#$A'        <customErrors mode="Off"/>'#$D#$A'    </system.web>'#$D#$A'</configuration></pre></code>'#$D#$A#$D#$A'                  </td>'#$D#$A'               </tr>'#$D#$A'            </table>'#$D#$A#$D#$A'            <br>'#$D#$A#$D#$A'            <b>Notes:</b> The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application''s <customErrors> configuration tag to point to a custom error page URL.<br><br>'#$D#$A#$D#$A'            <table width=100% bgcolor="#ffffcc">'#$D#$A'               <tr>'#$D#$A'                  <td>'#$D#$A'                      <code><pre>'#$D#$A#$D#$A'<!-- Web.Config Configuration File -->'#$D#$A#$D#$A'<configuration>'#$D#$A'    <system.web>'#$D#$A'        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>'#$D#$A'    </system.web>'#$D#$A'</configuration></pre></code>'#$D#$A#$D#$A'                  </td>'#$D#$A'               </tr>'#$D#$A'            </table>'#$D#$A#$D#$A'            <br>'#$D#$A#$D#$A'    </body>'#$D#$A'</html>'#$D#$A

Alguém faz ideia do que está ocorrendo de errado ou mais alguém está passando por esse problema?

 

Att,

Posted

Tentei entrar em contato com eles, porém ninguém atende ao telefone. Conversando com um colega que desenvolve sistema de NFe e usa TechnoSpeed, os mesmos informaram que a URL dos webservices mudaram recentemente. Imagino que o mesmo ocorreu com a NFC-e. Curioso é ninguém mais ter tido esse problema.

 

Vou continuar pesquisando e caso eu tenha alguma resposta, entro em contato.

 

Att,

Posted

Régys,

 

Depois de muito pesquisar, descobri que simplesmente o meu ACBr estava desatualizado. Fiz a atualização do componente e agora consigo cancelar a NFC-e numa boa, porém quando tento emitir a nota, recebo a seguinte mensagem de retorno:

 

Erro: Requisição não enviada.
0 - A operação foi concluída com êxito
 
Tem ideia do que pode ser?
 
Abraços
Posted

Bom,

 

Fiz um novo update no meu repositório do ACBr e fiz o teste no exemplo NFe2 e ocorre o mesmo erro. Na primeira vez que instalei o ACBr, tive um problema para emitir NFe e pesquisando no forum, descobri que tinha um trecho de código que precisava ser comentado ou descomentado (agora não lembro).

 

Depurando o fonte do ACBr, descobri que o erro é disparado a partir da unit ACBrHTTPReqResp.pas, rotina TACBrHTTPReqResp.Execute. Nesta rotina tem este trecho:

 

Result := {$IFDEF FPC} AnsiToUtf8(PChar(BufStream.Memory)) {$ELSE} PAnsiChar(BufStream.Memory) {$ENDIF};

 

Como não tenho este def FPC, Result recebe PAnsiChar(BufStream.Memory), o que está retornando '', causando o erro.

 

Att,

Posted

Boa noite 

este FPC é para o uso com o Lazarus que usar o Free Pascal!

qual versão do delphi está usando?

 

Bom Dia Juliomar,

 

Estou usando o Delphi XE3. Um amigo fez o mesmo teste no exemplo com o Delphi XE7 e teve o mesmo problema.

 

Att,

  • Solution
Posted

Boa Tarde Pessoal,

 

Consegui resolver o problema. Segue a solução.

 

Abra o arquivo Fontes\ACBrComum\ACBr.inc e descomente a linha {$DEFINE SoapHTTP}, dê um build all no seu projeto e tente enviar novamente.

 

Obrigado pela ajuda dos envolvidos.

 

Att,

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.