#1 2019-11-27 07:47:36

Georg
Member
Registered: 2016-11-22
Posts: 18

Interface based service with Delphi Android client

Hello,

I built an interfaced based service based on the example 14 with a windows client and everything works fine.
Now I'm trying to create an android client for this service. I exchanged the mormot.pas with the corresponding crossplatform units, but I'm stuck on how to proceed.
In the class TSQLRestClientHTTP in the crossplatform units, methods like:
  FClient.ServiceDefine([IServerMethods], sicPerUser, SERVER_CONTRACT);// sicShared);
  FClient.Services['ServerMethods'].Get(ServerMethods);
are not defined.

So how do I get the interface methods on the client side? Is it necessary to change/amend the server side or is it sufficient to make changes on the client side? I searched the forum and the documentation and checked out the example 27 on crossplatform clients, but it didn't really clarify things for me.

Any help would be appreciated.

Thanks in advance,
Georg

Offline

#2 2019-11-27 08:55:36

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Interface based service with Delphi Android client

Did you really get through https://synopse.info/files/html/Synopse … DE_TITL_86 ?

You need to generate the client connection unit - so enabling code generation on server side.
Then use the generated unit in your client UI.
See https://synopse.info/files/html/Synopse … #TITLE_489 about generating the unit
and https://synopse.info/files/html/Synopse … #TITLE_494 for SOA

Offline

#3 2019-11-29 07:04:20

Georg
Member
Registered: 2016-11-22
Posts: 18

Re: Interface based service with Delphi Android client

Thank you very much for your hints, that helped a lot :-).

Offline

Board footer

Powered by FluxBB