procedure TForm1.FormCreate(Sender: TObject);
var
HTTP: TIdHTTP;
Body: TStringList;
Response: String;
IdLogDebug: TIdLogDebug;
Stream: TMemoryStream;
begin
try
IdLogDebug := TIdLogDebug.Create;
IdLogDebug.Active := true;
Stream := TMemoryStream.Create;
HTTP := TIdHTTP.Create;
HTTP.Request.ContentType := 'application/
soap+
xml;charset=UTF-8';
HTTP.Request.AcceptEncoding := 'gzip,deflate';
HTTP.Intercept := IdLogDebug;
Body := TStringList.Create;
Body.Add('<
soap:Envelope xmlns:
soap="http://www.w3.org/2003/05/
soap-envelope" xmlns:blz="http://thomas-bayer.com/blz/">');
Body.Add('<
soap:Header/>');
Body.Add('<
soap:Body>');
Body.Add('<blz:getBank>');
Body.Add('<blz:blz>50010517</blz:blz>');
Body.Add('</blz:getBank>');
Body.Add('</
soap:Body>');
Body.Add('</
soap:Envelope>');
Body.SaveToStream(Stream);
Response := HTTP.Post('http://thomas-bayer.com/axis2/services/BLZService', Stream);
HTTP.Destroy;
except
on E:
Exception do
Writeln(E.ClassName, ': ', E.Message);
end;
end;