Voy de momento a usar esta función con la URL del Endpoint de la AEAT
Código Delphi
[-]
function VerificarServicioSOAP(const URL: string; Intentos: Integer): Boolean;
var
HTTP: TIdHTTP;
SSLHandler: TIdSSLIOHandlerSocketOpenSSL;
I: Integer;
begin
Result := False;
HTTP := TIdHTTP.Create(nil);
SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
try
HTTP.IOHandler := SSLHandler;
HTTP.ReadTimeout := 5000;
for I := 1 to Intentos do
begin
try
HTTP.Head(URL);
Result := True; Exit;
except
on E: EIdException do
; on E: Exception do
; end;
end;
finally
SSLHandler.Free;
HTTP.Free;
end;
end;
Con un elemento visual en verde si está activo y en rojo si NO está activo en el statusBar.
Esto en el hilo principal de la aplicación y si al ir a remitir facturas a la señora AEAT si está inactivo que ni lo intente.
Ya que en estos momentos está caido lo tengo a modo de pruebas