I have a class that's working and I want to move it into an XData service.
Here's the definition of a method in the Interface unit:
[HttpGet] function RunSnapshot( const SS_ID : string; aQryResp : TQryResp ) : TqrResults;
and in the Impl unit:
function RunSnapshot( const SS_ID : string; aQryResp : TQryResp ) : TqrResults;
and the classes:
TqrResults = class( TList )
. . .
TQryResp = class
some strings . . .
. . .
When I try to run it, I get this exception:
First chance exception at $766046D2. Exception class EUnsupportedActionParamType with message 'Cannot define action "RunSnapshot": Invalid type "TQryResp" for param "aQryResp"'. Process Local_test_client.exe (5608)
How do I figure out what the exact problem is?
Maybe I need more info on how to send PODOs to service interfaces and get them back?
Can they have fields that are also objects?
I have a class that calls a 3rd-party API and it puts some results into member objects.
What I ultimately need is something more like this:
[HttpGet] function RunSnapshot( const SS_ID : string; aQryResp : TQryResp ) : TQryResp;
where the object aQryResp has two objects inside of it that are filled with more data and then returned. One is raw data (which is rather big and not typically needed), and the other (of type TqrResults) is results of some analysis of the raw data.
But it's choking on the aQryResp input.
Any suggestions on how to handle this situation?