Ver Mensaje Individual
  #4  
Antiguo 28-07-2025
epuigdef2 epuigdef2 is offline
Registrado
 
Registrado: feb 2019
Posts: 4
Reputación: 0
epuigdef2 Va por buen camino
Vale, empiezo a responderme yo mismo.

Gran cagada: Las pruebas se han ido al entorno de producción. Ahora a ver cómo arreglamos esto...

Importé el WSDL y lo retoqué para poder seleccionar si se enviaba al entorno de pruebas o a productivo:

Código Delphi [-]
const
  URLVERIFACTUPROD = 'h_t_t_p_s://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP';
  URLVERIFACTUPRUEBAS = 'h_t_t_p_s://prewww2.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP';
  URLREQUERIMIENTOPROD = 'h_t_t_p_s://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP';
  URLREQUERIMIENTOPRUEBAS = 'h_t_t_p_s://prewww2.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP';

Añado un parámetro a la función GetsfPortTypeVerifactu y selecciono la URL:

Código Delphi [-]
function GetsfPortTypeVerifactu(UseWSDL, pruebas: Boolean; Addr: string; HTTPRIO: THTTPRIO): sfPortTypeVerifactu;
const
  defWSDL = 'h_t_t_p_s://prewww2.aeat.es/static_files/common/internet/dep/aplicaciones/es/aeat/tikeV1.0/cont/ws/SistemaFacturacion.wsdl';
//  defURL  = 'h_t_t_p_s://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP';
  defSvc  = 'sfVerifactu';
  defPrt  = 'SistemaVerifactu';
var
  RIO: THTTPRIO;
  defURL : String;
begin
  if pruebas then
    defURL := URLVERIFACTUPRUEBAS
  else
    defURL := URLVERIFACTUPROD;
...

Y cuando creo el servicio le paso el parámetro de pruebas a True:
Código Delphi [-]
  Servicio := GetsfPortTypeVerifactu(True, True); // Usa WSDL automàticament


Porqué se ha ido la comunicación a www1.agenciatributaria.gob.es/ ????

Alguna luz al respecto?

Gracias de antemano

Última edición por Neftali [Germán.Estévez] fecha: 29-07-2025 a las 09:01:42.
Responder Con Cita