Hello,
This is my situation: I have developed a SOAP server with one procedure that takes around 2 seconds to complete its task, and a client app that tries to simulate multiple clients connecting to my server. The problem is that my client calls are serialized and my server doesn’t seem to be multithreaded. Below you can find my server procedure, and I also uploaded a testcase. So my question is what I must do to support more than 2 connections at a time.
Using Delphi XE2, Remobjects 7.0.71.1093
Best regards,
Cristian Vasuica
Soap_REMSupport_TestCase.zip (3.0 MB)
function TServicii.Test: AnsiString;
var t0, t1, Duration : Cardinal;
Guid : tguid;
RGuid : HRESULT;
received : boolean;
const MaxTime : Cardinal = 3000;
begin
Result := '';
RGuid := CreateGuid(Guid);
if RGuid = S_OK then
Result := GuidToString(Guid);
t0 := GetTickCount;
t1 := GetTickCount;
duration := t1 - t0;
while (Duration < Maxtime) do begin
{ In this section I call a CreateProcess of another VFP program that performs some calculations
and writes the result in a dbf file. I wait for the VFP program to terminate it's execution,
but not more than MaxTime. }
if received then begin
Result := Result + '_RECEIVED_' + DateTimeToStr(Now);
Break;
end;
t1 := GetTickCount;
duration := t1 - t0;
if duration > Maxtime then begin //MaxTime allowed is exceded
Result := Result + '_NOTRECEIVED_' + DateTimeToStr(Now);
Break;
end;
end;
end;