#1 2014-12-05 14:17:39

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Problem with record as Result at Interface function

Hi AB,

I'm enhancing my Interface Stuff an liked to create the following function:

  RDetails = record
    FResult1 : RawJSON;
    FResult2 : RawJSON; 
    FResult3 : RawJSON;
    FResult4 : RawJSON;
  end;

  function Testfunction1(const AIDs : RawJSON) : RDetails;

  function Testfunction2(const AIDs : RawJSON; var ADetails : RDetails) : RawJSON;

The Server runs and the CrossplatformClient with generated wrapper also

But the client does not receive the Result

with Testfunction1 Error  received 0 parameters (expected 1)
with Testfunction2 Error  received 0 parameters (expected 2)

What is wrong ?


Rad Studio 12.1 Santorini

Offline

#2 2014-12-05 18:50:50

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

Re: Problem with record as Result at Interface function

Which version of Delphi are you using?
For older versions you need to define the json serialization for cross platform clients to work as expected.

Offline

#3 2014-12-06 01:11:33

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: Problem with record as Result at Interface function

I use XE7, very serious is the Result - Handling in the Debugger on the server - code.
Normal RawJSON - Results without record work as expected

Last edited by itSDS (2014-12-06 01:13:20)


Rad Studio 12.1 Santorini

Offline

#4 2014-12-06 10:30:52

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 516

Re: Problem with record as Result at Interface function

Hi AB i found out that the type RawJSON does not work in the record. I replaced it with RawUtf8 and no error occures.


Rad Studio 12.1 Santorini

Offline

Board footer

Powered by FluxBB