WebCore Grid Population Using XData without Aurelius

I created an XData Server which provides data to developers in other environments. I will not be using Aurelius but want to create a Web Core Application.

I can access the test data using:
https://services.mycompany.com/xdata/AlphaService/ReturnList

Which returns:
{
"value".: [
{"ReturnNo":650990020,"FormCode":1740,"TaxYear":2022,"TaxFiling":"A","DueDate":"2022-03-01T00:00:00","Status":"Delinquent"},
{"ReturnNo":657592755,"FormCode":1321,"TaxYear":2022,"TaxFiling":"A","DueDate":"2022-06-01T00:00:00","Status":"Delinquent"}]
}

I created a new Web Core Application and dropped the following components:
TXDataWebConnection
TXDataWebDataSet
TXDataWebSource
TWebDBGrid

I connected the components together and set the XDataWebConnection URL to https://services.mycompany.com/xdata/ and activated the connection. What do I need to do to display my data in the grid?

Thanks, Sidney

When invoking service operations with RawInvoke, you should manually set the data to the dataset:

Here is a small example:

And here is a more detailed explanation:

Basically:

  1. Use TXDataWebClient to retrieve data from the server directly using more flexible methods (like List). TXDataWebClient also provides you with async-flagged methods, meaning you can call them using await. There is a demo in XData installation folder (\demos\web\clientAsync) that shows how to use it. Once you get data from the client, you can put it in the dataset using SetJsonData and then you can call Open to iterate through the dataset.
procedure TfClientDatamodul.LoadOrders;
  procedure OnSuccess(Response: TXDataClientResponse);
  begin
    XDataWebDataSetOrders.Close;
    //XDataWebDataSetOrders.Connection:=NIL;
    //XDataWebDataSetOrders.EntitySetName:='';
    XDataWebDataSetOrders.SetJsonData(Response.Result);
    XDataWebDataSetOrders.Open;
  end;
begin
  XDataWebClientOrders.RawInvoke('IOrderService.GetOrders', ['10/10/2018', '10/10/2019'], @OnSuccess);
end;