私はモバイルウェブ技術を学ぶことをいとわない.net開発者です。現在、Androidプラットフォームに取り組んでいます。私はWebのバックグラウンドを持っているので、Jqueryが私に適したフレームワークであることがわかりました。今まで、Androidで簡単なWebアプリケーションを作成することはできますが、Jqueryから.netWebサービスへのAJAX呼び出しを行うことはできません。AndroidWebアプリのテスト環境を作成したいと思います。
1. I have ASP.NET web service running on my local computer
namespace JqueryMobile
{
[System.Web.Script.Services.ScriptService]
public class WebService1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
}
}
my webservice URL is : http://localhost:26415/WebService1.asmx
2. My android index.html
$(function(){
$.ajax({url:"localhost:26415/WebService1.asmx/HelloWorld",
success:function(result){
alert(result);
}});
});
This technique fails in local environment so, how do i test it?