Hi,
I used a 3rd-party websocket component to received websocket message and then to trigger the service accordingly.
My question is : How to I calling the service method with session required.
I checked the way to calling other serivice within current service.
function TFirstService.GetServerTime: DateTime;
var
cf: IROClassFactory;
instance: IInterface;
objactivation:IROObjectActivation;
begin
cf:=GetClassFactory(‘SecondService’);
cf.CreateInstance(ClientID, instance);
if Supports(instance, IROObjectActivation, objactivation) then
begin
objactivation.OnActivate(ClientID, nil);
end;
Result := (instance as ISecondService).GetServerTime();
if Supports(instance, IROObjectActivation, objactivation) then
begin
objactivation.OnDeactivate(ClientId);
end;
instance := nil;
end;
However, my current case is no any active service . Just like client within the server side.
Should I really create the same way as a delphi client like client channel and message etc.. ?
please advise