You are not logged in.
Pages: 1
Hey Arnaud, we call a SOA Interface function from a client.
we have 5 "Object" Parameter and 2 are initialized with nil on the Client.
On the Server this Parameter are not set to nil, they contain an "empty" Object. Is it possible to get the "nil" parameter.
Specially if one of the Parameter is an "out" Parameter, how is it with memory Management ?
Example:
TMyObject = class TSynPersistent...
interface...
function SOAFunktion(out AResultObject : TMyObject; const AParam1, Param2, AParam3 : TMyObject; const AParam4:TMyObject = nil) : TResultRecord;
Client Calls
var LResult : TMyObject := nil;
AServer.SOAFunction(LResult, p1, p2, p3, nil);
On the Server Side all 5 Objects does contain a TMyObject, p1-3 are the desired Objects. but AResultObject and AParam4 should be nil ?!
Last edited by itSDS (2023-05-11 11:48:23)
Rad Studio 12.1 Santorini
Offline
The class instances are passed by value, and are allocated/disallocated on the server side, as documented.
It means the "out " parameter lifetime is managed by the framework on server side.
There is no support of "nil" because the client side instances lifetime should reflect the server side expectations.
In practice, null within the JSON is not supported because the instances are allocated before the actual JSON is parsed.*
So this current behavior is a documented limitation/feature.
See
https://synopse.info/files/html/Synopse … l#TITL_154
and
https://synopse.info/files/html/Synopse … #TITLE_408
Offline
tyvm i can work with it
Rad Studio 12.1 Santorini
Offline
Pages: 1