Esta es la función que tengo para el envío. Nosotros optamos por poner el WSDL a false, para evitar cambios en versiones o que los de hacienda al liado alguna. Ya dará el error al enviar que eso si lo tenemos controlado.
Código Delphi
[-]function GetsiiSOAP(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): siiSOAP;
var
RIO: THTTPRIO;
defWSDL : string;
defURL : string;
defSvc : string;
defPrt : string;
begin
if EntornoPruebas then
begin defWSDL := 'https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/ssii/fact/ws/SuministroFactEmitidas.wsdl';
defURL := 'https://prewww1.aeat.es/wlpl/SSII-FACT/ws/fe/SiiFactFEV1SOAP';
defSvc := 'siiService';
defPrt := 'SuministroFactEmitidasPruebas';
UseWSDL := false;
end
else
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';
UseWSDL := false;
end;
Result := nil;
if (Addr = '') then
begin
if UseWSDL then
begin
Addr := defWSDL;
end
else
begin
Addr := defURL;
end;
end;
if HTTPRIO = nil then
RIO := THTTPRIO.Create(nil)
else
RIO := HTTPRIO;
try
Result := (RIO as siiSOAP);
if UseWSDL then
begin
RIO.WSDLLocation := Addr;
RIO.Service := defSvc;
RIO.Port := defPrt;
end else
RIO.URL := Addr;
finally
if (Result = nil) and (HTTPRIO = nil) then
RIO.Free;
end;
end;