从ExtJS框架连接到Web服务和WCF服务 [英] Connecting to web services and wcf services from ExtJS framework
本文介绍了从ExtJS框架连接到Web服务和WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用以下ExtJS框架代码从WebService中获取数据
I am using the following ExtJS framework code to fetch data from WebService
Ext.Ajax.request({
method: 'GET',
url: 'http://192.168.0.98/webservices/WebService.asmx/checkuser',
jsonData : Ext.encode(param),
headers: { 'Content-Type': 'application/json;charset=utf-8' },
success: function (response, request) {
alert('hit!') ;
},
failure: function (response, request) {
alert('not hit!');
}
});
服务方法如下
The service method is as below
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json, UseHttpGet = true)]
public string checkuser(string myString)
{
return "true"
}
该服务是可访问的,但从ExtJs中的上述代码调用时,它将失败.
请让我知道是否有任何错误.
The service is accessible but it fails when called from above code in ExtJs.
Please let me know of if there are any mistakes.
推荐答案
阅读:: ^ ]
这篇关于从ExtJS框架连接到Web服务和WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文