Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1963

XE10 Datasnap REST Server ingore null string parameter and shift value

$
0
0

Hi all,

This example is for demostration error.
In the datasnap REST Server, declared this function :

TServerMethods1 = class(TDataModule)
private
public
function EchoString(A,B: string; const C: Integer): string;
end;

......

function TServerMethods1.EchoString(A,B: string; const C: Integer): string;
begin
if c= 1 then
Result := a + b
else
Result := 'b'
end;

In the client application generate the client rest code by IDE and call the function:
procedure TForm3.Button1Click(Sender: TObject);
begin
ClientModule1.ServerMethods1Client.EchoString('TEST','',10);
end;

Into the server function. received this:
A = 'TEST'
B= '10' <------- This is the C parameters
C=0

If i call :ClientModule1.ServerMethods1Client.EchoString('TEST','HALLO',10);
Work fine.
How to pass null or '' string paramaters?

This example working in XE7 and XE8, only XE10 has this effect.

Why?

thx
Roby


Viewing all articles
Browse latest Browse all 1963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>