mORMot and Open Source friends
View Ticket
Not logged in
Ticket Hash: d19d9d67f2693641f863b2ce80acdaaea2d25ecd
Title: more complex return types not supported yet with interface based services
Status: Closed Type: Feature_Request
Severity: Important Priority: Immediate
Subsystem: Resolution: Not_A_Bug
Last Modified: 2012-05-28 13:36:54
Version Found In: 82dc3ba8e1
Description:
TServiceFactory.AddMethodsFromTypeInfo(aInterface: PTypeInfo); throws an exception when an object is used as function return value in an interface based service. It would be nice if this could be supported, just like Embarcfadero already does with SOAP.

ab added on 2012-05-28 13:36:54 UTC:
It is as designed.
As stated by the documentation: how will be in charge of freeing the instance?

If you want to retrieve some class instance content, you may use a var parameter with the instance: it will be unserialized on the function return.