I need to create a simple RestFull webserver with XE5. Following that example below it will run:

I need to create a simple RestFull  webserver with XE5. Following that example below it will run:

function TServerMethods1.GetDepartmentEmployees(const AID: string): TFDJSONDataSets;
begin
  // Clear active so that query will reexecute.
  FDQueryDepartmentEmployees.Active := False;
  FDQueryDepartment.Active := False;
  FDQueryDepartment.Params[0].Value := AID;
  FDQueryDepartmentEmployees.Params[0].Value := AID;
  Result := TFDJSONDataSets.Create;
  TFDJSONDataSetsWriter.ListAdd(Result, sDepartment, FDQueryDepartment);
  TFDJSONDataSetsWriter.ListAdd(Result, sEmployees, FDQueryDepartmentEmployees);
end;

Problem is with the result, I dont receive the data so the java client will not be able to get the information. How to make it reflect the correct JSON data?
I get such, what is the class:
{"FData":"QURCUwkApwBcYwEA/wA...

Comments