I am trying to invoke local service using following code on Android Emulator. Bellow is the JavaScript code to invoke the service.
Ext.Ajax.request({
url: "http://10.0.2.2/MyService.svc/Authenticate",
jsonData: data,
headers: {
"X-Authorization-Elf" : SessionManager.getCurrentSessionToken()
},
scope: scope,
success: function (response, options) {
},
failure: function(response, options) {
},
callback: function (options, success, response) {
// Hide the loading message box
Ext.Viewport.setMasked(false);
}
});
Call is not reaching to service. Application flow is going to failure case with status 0 and response text as empty.
Please suggest me the approach.
Did you add the host to the phonegap/cordova xml??
try adding this line to the phonegap/cordova xml in res/xml folder:
If you are using phonegap 2.0.0 add it to the config.xml