I am creating a PhoneGap application that should call some REST web service methods to get some data and to send some data to the server.
Somewhere in my program I have got the following code:
$.getJSON("https://mgeowiki4.iwvi.uni-koblenz.de/API/UniKoblenz/validateCredentials/SampleUser/Password",
function(data){
echo("data: " + data);
})
.success(function() { alert("second success"); })
.error(function() { alert("error"); })
.complete(function() { alert("complete"); });
Unfortunately when I execute this nothing happens. I am using Eclipse with the android emulator to test this. None of the alert messages are displayed. Even the error message is not displayed.
If I call the service in browser I get the following if the password was not correct:
{"passwordIsValid": "false"}
and the following if the password is correct:
{"passwordIsValid": "true"}
How can I get those results in my PhoneGap application?
I kind of have no clue what to do 🙁
Did you allow the ajax-endpoint in the whitelist?
Whats the output of logcat?