I'm trying to run this code to call a WCF function from a phonegap application on Android
I tested the webservice using POSTER from firefox and can get through just fine, and returns the correct values (actually it only returns true or false)
function verifyAccount(username, password){
$.ajax({
type: "post",
url: "http://50.63.174.229/banknoteservice/service1.svc/verifyAccount",
data: JSON.stringify("{'username' : 'test' , 'password' : 'test'}"),
contentType: "application/json",
dataType: "json",
success: function(msg) {
$("#myDiv").html(msg);
},
error: function(e){
$("#myDiv").html('error');
}
});
}
Every time I try to run it on the phone, it shows the error message in the div