[Mobile] Detailed Example of writing API response into Local Storage

[Mobile] Detailed Example of writing API response into Local Storage

  

Dear OutSystems

I have been having a lot of trouble getting my head around the mobile platform coming from the web platform. The fact there are no states,session variables and preparations make things rather difficult (for me at least).

I was wondering if some could guide me in doing the following:

Getting data from a SOAP API and writing that data into a local storage entity so that I can use it throughout the app.

Kind Regards

Werner

Solution

Hi Werner,

Getting data from SOAP API its the same as before with web apps. You have to do it server-side. For that you have to consume the SOAP service (https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/SOAP/Consume_a_SOAP_Web_Service) and then create a server action that calls the SOAP web service actions. 

On the client-side (either a client screen-action or a client-side action) execute the server action you created before. 

Create the entities in the local storage to store your data and define the logic to persist the captured data in the Local Storage. (https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Using_Local_Storage).

Then, when you need to access that data create aggregates to query that data (https://success.outsystems.com/Documentation/10/Developing_an_Application/Use_Data/Query_Data/Fetch_and_Display_Data_from_the_Database#Example_in_a_Mobile_App).


Solution