Sync
The flow for sending data to the webservice, receiving and parsing the response is as follows.
- itaObject.doAction(“sync”,serverid,xml,parametername,this.parseServerXML); function is called to send the data to the server. This function is defined in the ITAnyplace.js file. It calls the this.Device.exec(param1) function, which forwards the call to the native code for transfer. In the native code, controller handles all type of request form javascript api.
- After the completion of the request, appropriate response is returned itaObject.doAction(“gotSyncResponse”,param1) method in ITAnyplace.js. This method then calls the callback function, parseServerXML, of the particular widget. The parseServerXML(param1) function parses the response from the server.
|