【发布时间】:2012-03-05 08:06:54
【问题描述】:
我是 sencha touch 的新手,我想在 sencha touch 中使用 soap web 服务。我为此编写了代码,但问题是我得到的只是纯 HTML 内容作为响应,而不是 soap 对象。而且我不知道如何从 web 服务调用特定方法到 sencha touch。
这是我的代码:-
Ext.Ajax.request({
method: 'get',
url: 'http://192.168.1.15:80/himanshu/helloworldwebservice.asmx',
success: function (response, request) {
alert('Working!')
alert(response.responseText)
console.log('Response:-'+response.responseText)
},
failure: function (response, request) {
alert('Not working!')
console.log('Response Status:- '+response.status)
}
});
编辑:- 好的,我想到了从 here 调用 Web 服务的特定方法。就像我有 HelloWorld() 方法,它只返回一个字符串,我的网址是 @987654325 @。
我可以通过这样设置我的 url 来调用 HelloWorld() 方法:- http://192.168.1.15:80/himanshu/helloworldwebservice.asmx/HelloWorld
但这对我不起作用。每次我运行程序时都会生成“不工作”警报,500 是我得到的响应统计信息。请让我了解如何从 web 服务调用方法.thanx提前。
【问题讨论】:
-
在几天前看到这个link,我发现了同样的问题,然后得到了解决方案。
标签: android web-services sencha-touch