#1 2020-09-11 01:23:44

radexpol
Member
From: Poland, Krk
Registered: 2019-11-29
Posts: 116

SOA - parameter name=value instead of array

I've declared the interface:

type
  TCounters = record
    MemoryUsage: Integer;
    QueueCount: integer;
  end;

  IServerMonitor = interface(IInvokable)
    ['{21F546FB-F20E-43B8-8644-E86288A23BB6}']
    function MemoryUsage: integer;
    function DBQueueCount: integer;
    procedure Counters(out MemoryUsage: Integer; out QueueCount: integer);
    function Counters2: TCounters;
    procedure Counters3(out Items: TCounters);
  end;

when I execute the Counters method: http://localhost:2080/api/servermonitor.counters I'm getting array {"result":[123,11]}. How to prepare the procedure to retrieve the parameters name without an array? Expected result: {"result": {"MemoryUsage":123,"DBQueueCount":11}  } .

The rest of methods Counters2, Counters3 generates the array also: {"result":[{"MemoryUsage":444,"QueueCount":666}]}

Offline

#2 2020-09-11 05:48:00

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

Re: SOA - parameter name=value instead of array

Offline

Board footer

Powered by FluxBB