Cita:
Empezado por keys
Lo hacemos con el objeto wsdl. Hemos cambiado en todos los ficheros que se generan automáticamente con el wdsl los metodos GETSIISOAP. Te pongo un ejemplo de emitidas.
Código Delphi [-]
if Hacienda = Navarra then
begin
defURL := 'https://sii.hacienda.navarra.es/SII_PRUEBAS.proxy/SiiMensajesXsdHandlet.ashx';
defSvc := 'siiService';
defPrt := 'SuministroFactEmitidasPruebas';
UseWSDL := false;
end
else
begin
begin defWSDL := 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroFactEmitidas.wsdl';
defURL := 'https://www1.agenciatributaria.gob.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV1SOAP';
defSvc := 'siiService';
defPrt := 'SuministroFactEmitidas';
end;
|
Basta con usar el parámetro Addr de la función GetsiiSOAP (con UseWSDL a false), creo que defURL, defSvc y defPrt sobran.
function GetsiiSOAP(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): siiSOAP;
si os puede servir de ayuda yo hago con una función que me devuelve la url (Addr) a usar según los casos.
function TGestionSiiEnviarDatCli.GetUrl: string;
begin
if HdParam(parSfnUrlSii).AsString = 'E' then
if HdParam(parSfnModoPruebaSii).AsBoolean then
//---- pruebas estado
if DatosATR_LIBRO.AsString = 'E' then
result := 'https://www7.aeat.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV1SOAP'
else
result := 'https://www7.aeat.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP'
else
//---- produccion estado
if DatosATR_LIBRO.AsString = 'E' then
result := 'https://www1.agenciatributaria.gob.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV1SOAP'
else
result := 'https://www1.agenciatributaria.gob.es/wlpl/SSII-FACT/ws/fr/SiiFactFRV1SOAP'
else if HdParam(parSfnUrlSii).AsString = 'N' then
//---- pruebas Navarra
result := 'https://sii.hacienda.navarra.es/SII_PRUEBAS.proxy/SiiMensajesXsdHandlet.ashx'
else
result := 'Url Guipuzcoa desconocida';
end;