var
Client: TXDataClient;
Retval: string;
begin
Client := TXDataClient.Create;
try
Client.Uri := 'http://127.0.0.1:2018/GASphinx';
try
Retval := Client.Service<IGARegisterService>.Hello;
MessageDlg(Retval, mtInformation, [mbOK], 0);
except
on e: exception do
MessageDlg(e.Message, mtError, [mbOK], 0);
end;
finally
Client.Free;
end;
end;
But this raises the exception:
Project GATools.exe raised exception class EXDataInterfaceServiceNotFound with message 'Interface "IGARegisterService" not registered as a service contract.'.
But Biz.Sphinx is an internal model used by TMS Sphinx, so I simply recommend that you remove the Model attribute from your interface, or simply use a different model.
What kind of issues? Note that when updating the database structure, you can pass several model names so the database will be updated accordingly to hold tables for all the provided models.
If I remove the service from Biz.Sphinx then I can't access it through the url that is used to access Sphinx.
If I add another XData server to the server app with a different URL then I can access the service, but then I get
Project GASphinx.exe raised exception class EXDataMissingConnection with message 'Database connection not avaiable. Check if the connection pool is properly configured.'.
Then records I am adding/updating are in the Biz.Sphinx model (extended user class and an organisation/company class).
That simply means you should set the Pool property of the TXDataServer component, if you want to use databases.
But fine, if you are extending Sphinx and all this is related to Sphinx, it's no problem you use the model Biz.Sphinx. But then, as I said, create the TXDataClient using that model.