You are not logged in.
Dear ab.
I need for greater flexibility to send and receive binary files (JPG and DataSet plain) with the aim of minimizing the consumption of internet, because here in my country this is a very poor quality of service.
For this I need in the Client for iOS and Android can write functions (services) sending and receiving TServiceCustomAnswer. Including more parameters. Today it seems that only this available to receive TServiceCustomAnswer.
Here we were treated this http://synopse.info/forum/viewtopic.php?id=2592, but only for download. But also said takes to upload.
Already I sought a solution to this and found the Forum and documentation and examples. Or am I blind.
To solve the problem I am momentarily using THttpApiServer and manupulando the Ctxt: THttpServerRequest. But it seems that is not secure.
Do you have any plans to implement this or have other better solution?
Thank you.
Ubaltino Faleiro
www.sistemainteligente.com
Brasil - Goiás - Goiânia
Offline
In this excerpt (client side FMX)
TServiceLoja.Get_Logo function (IDLoja: Int64;
var Logo: TServiceCustomAnswer TSQLRawBlob {};
var RetornoCodigo: Integer;
var RetornoMensagem: String): Boolean;
var
res: TVariantDynArray;
begin
fClient.CallRemoteService (self, 'Get_Logo', 4,
[IDLoja,
Hence, E2010 <<< // ERROR: Incompatible Types: "TServiceCustomAnswer" and "Variant"
RetornoCodigo, RetornoMensagem], res);
// Result: = res [0];
Logo: = res [0]; <<< // ERROR E2010: Incompatible Types: "TServiceCustomAnswer" and "Variant"
RetornoCodigo: res = [1];
RetornoMensagem: = res [2];
Result: = res [3];
end;
Accuses highlighted above errors.
How to solve them? Or as converts to TServiceCustomAnswer Variant correctly?
Ubaltino Faleiro
www.sistemainteligente.com
Brasil - Goiás - Goiânia
Offline
TServiceCustomAnswer won't be handled as you expect, in all cases, even with the mORMot.pas client.
There is no direct binary upload support for interface-based services yet.
You would have to use a method-based service in this case.
Offline