procedure TForm1.IdHTTPServer1CommandGet(AThread: TIdPeerThread;
ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo);
var
lGWDataService: IGWDataService;
I : integer;
sl : TStringlist;
sl1 : TStringlist;
sl2 : TStringlist;
ergebnis :
String;
starttime : TTime;
endtime : TTime;
begin
AThread.Start;
starttime := now;
meparams.Lines := ARequestInfo.Params;
meparams.Lines.add('
');
meparams.Lines.add(inttostr(AThread.ThreadID));
sl := Tstringlist.create;
sl1 := Tstringlist.create;
sl2 := Tstringlist.create;
application.ProcessMessages;
for I := 0
to meparams.Lines.Count -1
do
begin
if pos('
VO=',meparams.Lines.Strings[i]) > 0
then
splitstring(meparams.lines.Strings[i],'
=',sl);
if pos('
NA=',meparams.Lines.Strings[i]) > 0
then
splitstring(meparams.lines.Strings[i],'
=',sl1);
end;
application.ProcessMessages;
AResponseInfo.ResponseNo := 0;
AResponseInfo.ResponseText := '
';
application.ProcessMessages;
// Abfrage in einer DB auf Vorname und nachname
splitstring(ergebnis,'
-',sl2);
AResponseInfo.ResponseNo := strtoint(trim(sl2[0]));
AResponseInfo.ResponseText := sl2[1];
AResponseInfo.WriteHeader;
AResponseInfo.WriteContent;
endtime := now;
melog.lines.Add('
Aufruf des Service zu Verarbeitung : ' +Formatdatetime('
ss.zzz',endtime - starttime)+'
mit der Session ID = '+inttostr(AThread.ThreadID));
application.ProcessMessages;
melog.refresh;
sl.free;
sl1.free;
sl2.free;
AThread.Terminate;
end;