I'm developing a mobile Android app using xData and xData Client, including Service Implementation.
All was working perfectly until I integrate xData Rest API into DreamFactory
API exposed with DreamFactory works fine with
- Mobile App in Win32 mode
But when I run the Mobile App I get an exception when call API with xdata client
Part of code
ClientxData.HttpClient.OnSendingRequest := procedure(Req: THttpRequest) begin Req.Headers.SetValue('X-DreamFactory-Session-Token', DM_DreamFactory.SessionToken); Req.Headers.SetValue('X-DreamFactory-Api-Key', DM_DreamFactory.ApiKey); end; . . . PadMobile := ClientxData.Service<IPadMobileService>; UserPosGPS := PadMobile.PadMobile_GPS_from_CP(Loc_Edit_CP.Text); . . .
When calling function associated to implementation I get an exception
java.net.ProtocolException : unexpected end of stream
It seems link to different size of data between expected and received
And this occurs only with Android (not iOS tested yet).
Direct request to Web Server hosting xData API works fine even with Android.
I guess this can be linked to DreamFactory Proxy behavior but I request help to find a way to focus on.