Is there a possibility of loging call methods and DA objects on the server per session,
Delphi XE3 , RO is 9.1.99
Thanx
Is there a possibility of loging call methods and DA objects on the server per session,
Delphi XE3 , RO is 9.1.99
Thanx
Hi,
can you rephrase your q, pls?
I want intercept every method execution and loging method name and session
Uh
How do you want to intercept every request?
for example, you can use OnReadFromStream/OnWriteToStream events of Server component. here you can get client’s request and server’s response.
if you want just get information about client, you can use OnGetDispatchInfo
event of _Impl. see code snippet in Receiving information about client on server-side topic
another way - create descendant of TROInvoker and override CustomHandleMessage
method.
old code:
initialization
fClassFactory := TROClassFactory.Create('MegaDemoService', Create_MegaDemoService, TMegaDemoService_Invoker);
new one:
type
TMyMegaDemoService_Invoker = class(TMegaDemoService_Invoker)
protected
function CustomHandleMessage(const aFactory: IROClassFactory;
const aMessage: IROMessage;
const aTransport: IROTransport;
out oResponseOptions: TROResponseOptions): boolean; override;
..
initialization
fClassFactory := TROClassFactory.Create('MegaDemoService', Create_MegaDemoService, TMyMegaDemoService_Invoker);
in TMyMegaDemoService_Invoker.CustomHandleMessage
you can allow/disallow execution of server’s method