Running Mobile App off the server

Running Mobile App off the server

  

Hello all,


I have a mobile app that I intent to run totally independent of my company's server, i.e. all communication with the company has to be through web service (WS) calls. This starts from all the authentication through to all synchronisation of the data. Obviously, this takes away the ability of the app automatically doing upgrades whenever there are new releases - but that's ok.


I removed all the actions that have direct access to the server such as Login, Logout and I don't use the 'User' system table at all on the mobile app. My problem now is that, when this app runs on the tablet it fails when it tries to make the WS calls with error 'Unable to connect to remote server'. I can't even trace this error because there are no logs in ServiceCenter, which is correct because the app is not running on the server.


However, if I test the same WS through another mobile app developed and running in my personal Outsystems environment the calls are successful, implying there are no problems with the WS and it demonstrates our Firewall is allowing the WS calls through.

Does anyone know why this app is failing to make the WS calls and how I can fix that?


Just another info, we currently have the same app developed in Xamarin and running exactly as I now intent the Outsystems app to run and it runs perfectly with no problems.


Regards,


Shupie.


Hi Shupie,

When a Mobile App calls a REST service, what actually happens is that it calls the Plaform Server (via REST), which performs the REST call on behalf of the Mobile App. This is intended, as many REST APIs (espcecially B2B ones) can't be called from anywhere (IP whitelisting, certificates), making it impossible for a Mobile App to call them. The same mechanism is used when calling a Server Action: the Mobile App makes a "hidden" REST call to the Platform Server, which executes the Server Action, JSON Serializes the result and sends it back to the Mobile App.

If you want to call a REST service independent of the Platform Server, you'll need to do that in Java Script inside the Mobile App. If you don't know how to do that, it's easy to google for examples.

Thank you Kilian for prompt reply.

I am actually making calls to a SOAP service, but I think your explanation still applies. I will try that and give you feedback.


Regards,


Shupie.

Hi Shupie,

Indeed, for SOAP it's the same. Note however that creating and processing SOAP calls via JavaScript may be a lot more complex than REST, but it should be doable. Good luck :).