Ir para conteúdo
  • Cadastre-se

dev botao

The '' namespace provided differs


Ver Solução Respondido por Rafael Dias,
  • Este tópico foi criado há 1592 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

  • Fundadores

Por favor dê mais detalhes do que você está tentando fazer...

Você usa os componentes, ACBrLib ou ACBrMonitor ?

Já analisou o código fonte dos Demos ?

Consultor SAC ACBr

Daniel Simões de Almeida
O melhor TEF, é com o Projeto ACBr - Clique e Conheça
Ajude o Projeto ACBr crescer - Assine o SAC

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

Link para o comentário
Compartilhar em outros sites

  • Administradores

Boa tarde.

Forneça mais detalhes...

Fez testes no demo?

Queira por favor anexar seu xml.

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 !!

Link para o comentário
Compartilhar em outros sites

  • Membros Pro

Bom já trabalho a um bom tempo com a biblioteca FLEXDOCS, agora estou mudando aos poucos para o ACBr, começando pela CCe.

Não esta bem claro pra mim quais arquivos/pastas devo anexar para o perfeito funcionamento ...

Segue a rotina, que fiz as mudanças.

image.thumb.png.29cd8330f7553f8497a6c09dd615edf1.png

procedure TDM.ConfigurarNFe(const ACNPJ: string; vDATA: TDate);
var
  PathApp: String;
  PathDocumentos: String;
begin
  PathApp := ExtractFilePath(ParamStr(0));
  PathDocumentos := IncludeTrailingPathDelimiter(PathApp + 'NFE'+Format('%2.2d',[vFILIAL])+'\'+FormatDateTime('YYYYMM',vDATA) );
  (* Caso não exista a PASTA, então crie ela *)
  if not DirectoryExists( PathDocumentos ) then CreateDir( PathDocumentos );
  // diretorios
  ACbrNFe1.Configuracoes.Arquivos.PathSchemas := PathApp + 'Schemas\NFe';
  ACbrNFe1.Configuracoes.Arquivos.PathNFe     := PathDocumentos + 'nfe\';
  ACbrNFe1.Configuracoes.Arquivos.PathEvento  := PathDocumentos + 'eventos\';
  ACbrNFe1.Configuracoes.Arquivos.PathInu     := PathDocumentos + 'inutilizacao\';
  ACbrNFe1.Configuracoes.Arquivos.PathSalvar  := PathDocumentos + 'salvar\';
  // diretorio de padfs
  ACbrNFe1.DANFE.PathPDF := PathDocumentos + 'pdf';
  // arquivos baixados
  ACbrNFe1.Configuracoes.Arquivos.DownloadDFe.PathDownload := PathDocumentos + 'download\';
  (* Caso não exista os diretórios, então crie-os *)
  if not DirectoryExists(IncludeTrailingPathDelimiter(PathDocumentos)) then
     CreateDir(IncludeTrailingPathDelimiter(PathDocumentos));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathSchemas)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathSchemas));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathNFe)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathNFe));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathEvento)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathEvento));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathInu)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathInu));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathSalvar)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.PathSalvar));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.DANFE.PathPDF)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.DANFE.PathPDF));
  if not DirectoryExists(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.DownloadDFe.PathDownload)) then
     CreateDir(IncludeTrailingPathDelimiter(ACbrNFe1.Configuracoes.Arquivos.DownloadDFe.PathDownload));

  // acesso e certificado
  Empresa.Get( ACNPJ );

  if Trim(Empresa.CNPJ) = '' then
    raise EDatabaseError.CreateFmt('CNPJ "%s" não cadastrado!', [ACNPJ]);

  if Empresa.AMBIENTE= 'H' then
    ACBrNFe1.Configuracoes.WebServices.Ambiente := taHomologacao
  else
    ACBrNFe1.Configuracoes.WebServices.Ambiente := taProducao;


  ACBrNFe1.Configuracoes.Certificados.ArquivoPFX  := '';
  ACBrNFe1.Configuracoes.Certificados.NumeroSerie := '';
  ACBrNFe1.Configuracoes.Geral.SSLLib:=libNone;
  ACBrNFe1.SSL.Clear;

  case Empresa.SSL_LIB of
    0:
      begin
        ACBrNFe1.Configuracoes.Geral.SSLLib := libWinCrypt;

        if FileExists(Empresa.CERTIFICADO) then
          ACBrNFe1.Configuracoes.Certificados.ArquivoPFX := Empresa.CERTIFICADO
        else
          ACBrNFe1.Configuracoes.Certificados.NumeroSerie := Empresa.CERTIFICADO;
      end;

    1:
      begin
        ACBrNFe1.Configuracoes.Geral.SSLLib := libOpenSSL;

        if FileExists(Empresa.CERTIFICADO) then
          ACBrNFe1.Configuracoes.Certificados.ArquivoPFX := Empresa.CERTIFICADO
        else
          ACBrNFe1.Configuracoes.Certificados.NumeroSerie := Empresa.CERTIFICADO;
      end;

    2:
      begin
        if Pos('.pfx', Empresa.CERTIFICADO) > 0 then
          raise EDatabaseError.Create('Capicom não suporta carregamento de certificado por arquivo!');

        ACBrNFe1.Configuracoes.Geral.SSLLib := libCapicom;
        ACBrNFe1.Configuracoes.Certificados.NumeroSerie := Empresa.CERTIFICADO;
      end;
  end;

  ACBrNFe1.Configuracoes.Certificados.Senha  := Empresa.CERTIFICADO_SENHA;
  ACBrNFe1.Configuracoes.Geral.SSLXmlSignLib := xsLibXml2;

  ACBrNFe1.Configuracoes.Geral.SSLLib        := libWinCrypt;
  ACBrNFe1.Configuracoes.Geral.SSLCryptLib   := cryWinCrypt;
  ACBrNFe1.Configuracoes.Geral.SSLHttpLib    := httpWinINet;
  ACBrNFe1.Configuracoes.Geral.SSLXmlSignLib := xsMsXml;

  ACBrNFe1.Configuracoes.WebServices.SSLType    := LT_all;
  ACBrNFe1.Configuracoes.WebServices.UF         := Empresa.UF;
  ACBrNFe1.Configuracoes.WebServices.Tentativas := 10;
  ACBrNFe1.Configuracoes.WebServices.TimeOut    := 50000;
end;
 

Link para o comentário
Compartilhar em outros sites

  • Administradores

Boa tarde.

Você testou no demo conforme os posts anteriores?

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 !!

Link para o comentário
Compartilhar em outros sites

  • Consultores

Boa tarde,

Você não andou copiando os Schemas (*.xsd) da NF-e, CT-e e outros para uma única pasta?

Se sim, esta errado, vai ter problemas.

  • Curtir 1
Consultor SAC ACBr

Italo Giurizzato Junior
Ajude o Projeto ACBr crescer - Assine o SAC

Projeto ACBr

Analista de Sistemas / e-mail: [email protected] / Fone: (16) 9-9701-5030 / Araraquara-SP

Araraquara - A era dos Trólebus

Link para o comentário
Compartilhar em outros sites

  • Solution

Outra coisa se código de carregamento de certificado esta errado.

  1. CAPICOM carrega certificado pelo arquivo PFX sim.
  2. Não utilize CAPICOM esta depreciado, use Wincrypt no lugar, pode desativar ela ativando a diretiva DFE_SEM_CAPICOM na ACBr.inc.
  3. OpenSSL não suporta carregamento de certificado pelo número de serie.
  • Curtir 2

 

Link para o comentário
Compartilhar em outros sites

×
×
  • 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.