Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Colaboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 21-09-2021
Avatar de HerensugeBeltz
HerensugeBeltz HerensugeBeltz is offline
Miembro
 
Registrado: may 2021
Ubicación: Hondarribia
Posts: 90
Poder: 6
HerensugeBeltz Va por buen camino
TicketBAI: firma de un XML con SecureBlackBox 2020

Cita:
Empezado por juramisa Ver Mensaje
Buenas tardes,

A ver si alguien puede ayudarme. Estoy intentando enviar un fichero XML, creado igual que para Bizkaia, pero con las diferencias de Gipuzcoa lo guardado en 'el_fichero_a_enviar', sin comprimir.

A la hora de enviar, yo utilizo HTTPClient de SecureBlackBox, programación en Delphi

Pues bien, al enviar da un error 'Connection lost due to error 10058' aparentemente me rechaza y no consigo, por más pruebas y combinaciones que haga al conectar. Podéis indicarme como lo hacéis vosotros, para ver donde me equivoco?

Gracias
Hola Juramisa,
Te adjunto el código que uso yo. Los envíos de prueba van bien (es en C++Builder). En mi caso tuve problemas con el método SendFile y tuve que usar PostBytes. XMLOrigen es el fichero XML firmado y grabado en disco.

Código:
  // Cargo el fichero como un array de bytes. Con otros métodos se desvirtuaba el
  // contenido y el envío fallaba.
  DynamicArray<byte> cnt;
  std::unique_ptr<TFileStream> fs(new TFileStream(XMLOrigen,	fmOpenRead));
  cnt.Length= fs->Size;
  fs->Read(cnt, 0, cnt.Length);

  bool resul(true);
  try
  {
    sbxHTTPClient1->TLSAutoValidateCertificates= true; 
    sbxHTTPClient1->TLSVersions= TsbxConstants::csbTLS12;
    sbxHTTPClient1->ReqParamsContentType= L"application/xml;charset=UTF-8";
    sbxHTTPClient1->ReqParamsAcceptCharset= L"UTF-8";
    sbxHTTPClient1->ReqParamsAccept= L"*/*";
    sbxHTTPClient1->ReqParamsHTTPVersion= TsbxHTTPClientReqParamsHTTPVersions::chvHTTP11;
    sbxHTTPClient1->TLSRenegotiationAttackPreventionMode= TsbxHTTPClientTLSRenegotiationAttackPreventionModes::crapmAuto;
    sbxHTTPClient1->Config(L"UseSystemCertificates=true");
    // Cambio el timeout por defecto
  // SocketDNSTotalTimeout (0): The timeout (in milliseconds) for the whole resolution process
  // SocketTimeout (60000): The maximum period of waiting, in milliseconds, after which the socket operation is considered unsuccessful.
    sbxHTTPClient1->SocketDNSTotalTimeout= 2000;
    sbxHTTPClient1->SocketTimeout= 2500;

    sbxHTTPClient1->PostBytes(endPoint, cnt);
  }
  catch (Exception &e)
  {
    err= L"Error en el envío de la factura XML.\r\n"+ e.Message + L"\r\n" +
      sbxHTTPClient1->ReasonPhrase;
    resul= false;
  }
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
SII -Nuevo sistema de la Agencia Tributaria española de envío de datos vía Webservice newtron Internet 3716 19-01-2026 20:01:34
Como utilizar la ayuda del nuevo Sistema Operativo gluglu Humor 3 24-09-2007 09:39:05
Aplicacion Agencia De Viajes ArdiIIa Varios 9 20-01-2007 16:49:53
El Vasco Aguirre Al González La Taberna 5 26-05-2006 09:22:28
Microsoft ha lanzado su nuevo sistema operativo DarkByte Humor 0 25-01-2004 09:21:14


La franja horaria es GMT +2. Ahora son las 01:28:52.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi