#1 2015-09-13 15:50:06

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

Passing Empty Array to SOA function does result in Error 406

Hi Ab i declared an interface function like this:

function GetSomething(const ACode : RawUtf8; const ASomeStrings : TRawUTF8DynArray) : RResult;

calling it from the Client with

GetSomething('test', []) 

does not work. The Logfile contains the following error

20150913 15460546 debug     TSQLRestServerDB(0101D4D0) TSQLRestRoutingREST.Error: {  "errorCode":406,  "errorText":"Shared execution failed (probably due to bad input parameters) for IDFInterfaceV1.GetSomething"  }
20150913 15460546 srvr      TSQLRestServerDB(0101D4D0) DFUser 127.0.0.1 POST program/DFInterfaceV1.GetSomething SOA-Interface -> 406 with outlen=129 in 67 us

I debugged in mormot.pas, there the ASomeString Paramter is nil

I think that passing empty array should work.

Last edited by itSDS (2015-09-13 15:56:10)


Rad Studio 12.1 Santorini

Offline

#2 2015-09-13 16:00:47

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

Re: Passing Empty Array to SOA function does result in Error 406

I added some tests, and no problem with Delphi.
See http://synopse.info/fossil/info/94fff54949

BTW, are you using FPC?
As documented, we identified some issues with dynamic arrays transmitted as interface parameters with FPC:

    {$ifndef FPC} // FPC dynamic arrays parameters are not consistent with Delphi
                  // see by fpc\compiler\i386\cpupara.pas :(

Offline

Board footer

Powered by FluxBB