このコードを実行して、Android の phonegap アプリケーションから WCF 関数を呼び出そうとしています
Firefox の POSTER を使用して Web サービスをテストしたところ、問題なく通過でき、正しい値が返されました (実際には、true または 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');
}
});
}
電話で実行しようとするたびに、divにエラーメッセージが表示されます