#1 2018-03-11 15:47:38

VijeshVNair
Member
Registered: 2018-03-10
Posts: 2

How to use TSQLRestServerURIContext in interface based services

Hi,
I am getting the following error when am adding a interface method with TSQLRestServerURIContext.

"Project mORMotRESTsrv.exe raised exception class EInterfaceFactoryException with message 'TInterfaceFactoryRTTI.Create: IRestMethods.UploadFile "Ctxt" parameter has unexpected type TSQLRestServerURIContext - use TJSONSerializer.RegisterCustomSerializer()'"

is it impossible to use?

Thanks
VIJESH

Offline

#2 2018-03-11 20:49:24

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,606
Website

Re: How to use TSQLRestServerURIContext in interface based services

You can't use a TSQLRestServerURIContext  in an interface-based service, since it expects all parameters to be passed by value, and a TSQLRestServerURIContext is not a value object.

But you can access it via a global threadvar.
Or mix interface-based services and method-based services, if needed.

Offline

Board footer

Powered by FluxBB