I'm using rawinvokeasync with xdatawebclient to return a json result without any problem in my Delphi unit. I want to move these calls to a datamodule for conciseness and coding efficiency. However, I get the following compiler error in the TWebdatamodule with this code on the assignment to Response
function TdmFinale.LoadTableData(QID:integer) : boolean;
var
Response: TXDataClientResponse;
begin
result := true;
retdata := '';
try
case QID of
1 : Response := await(XDataWebClient1.RawInvokeAsync('IFinDataService.GetVPtns', []));
2 : Response := await(XDataWebClient1.RawInvokeAsync('IFinDataService.GetProvList', []));
end;
.....
end;
......
except on E:Exception do
begin
result := false;
end
end;
end;
Error= E2010: Incompatible types: TXDataClientResponse and TJSValue
I'm using XData 5.11