Obtener el SOAP Request y SOAP Responsive en DELPHI
Publicado por Saúl (1 intervención) el 03/07/2020 18:39:55
Hola comunidad hace poco tuve un problema para obtener el SOAP Request y SOAP Responsive en DELPHI, fui apoyado en el grupo de WhatsApp de la comunidad en español de delphi: "Delphi en Español", ayudado especialmente por Bismarck. A continuación dejo la solución:
Espero que a alguien más le sirva. Saludos.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
procedure TFacturaElectronica.EventoAfterExecute(const MethodName : string; SOAPResponse : TStream);
var
sLista : TStringList;
begin
sLista := TStringList.Create;
SOAPResponse.Position := 0;
sLista.LoadFromStream(SOAPResponse);
sLista.SaveToFile(Sistema.DirectorioTemporal + 'SoapDespues.txt');
sLista.Free;
end;
procedure TFacturaElectronica.EventoBeforeExecute(const MethodName : string; SOAPResponse : TStream);
var
sLista : TStringList;
begin
sLista := TStringList.Create;
SOAPResponse.Position := 0;
sLista.LoadFromStream(SOAPResponse);
sLista.SaveToFile(Sistema.DirectorioTemporal + 'SoapAntes.txt');
sLista.Free;
end;
Rio := THTTPRIO.Create(nil);
// Para depurar el envio de SOAP
Rio.OnAfterExecute := EventoAfterExecute;
Rio.OnBeforeExecute := EventoBeforeExecute;
Espero que a alguien más le sirva. Saludos.
Valora esta pregunta
0