如何消耗煎茶触摸SOAP的Web服务? [英] How to consume SOAP web service in SENCHA TOUCH?

查看:141
本文介绍了如何消耗煎茶触摸SOAP的Web服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来煎茶联系,我想消费SOAP网络服务煎茶touch.I写了code这个原因,但问题是,我得到只是普通的HTML内容不响应肥皂对象。我不知道该怎么称呼从Web服务的具体方法,以煎茶触摸。

I am new to sencha touch and i want to consume soap web service in sencha touch.I have written code for this cause, but the problem is that I am getting just plain HTML content as response not the soap object. And I dont know how to call a specific method from web service to sencha touch.

下面是我的code: -

Here's my code :-

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)
    }

});

编辑: - 确定我得到了主意,从调用从Web服务的具体方法<一href="http://www.c-sharpcorner.com/Forums/Thread/120707/load-Asp-Net-web-service-response-in-sencha-touch-data-store.aspx"相对=nofollow>此处。像我有的HelloWorld()方法,该方法只返回一个字符串,我的网址是 HTTP: //192.168.1.15:80/himanshu/helloworldwebservice.asmx 。 我可以通过设置我的网址是这样叫的HelloWorld()方法: - http://192.168.1.15:80/himanshu/helloworldwebservice.asmx/HelloWorld

- Ok i got the idea to call a specific method from web service from here.Like i have HelloWorld() method which only returns a single string and my url is http://192.168.1.15:80/himanshu/helloworldwebservice.asmx. I can call HelloWorld() method by setting my url like this :- http://192.168.1.15:80/himanshu/helloworldwebservice.asmx/HelloWorld

但它不工作的me.Every时间我运行该程序不工作的警报生成和 500 是响应统计我gets.Please让我明白,我怎么能叫的Web服务方法.Thanx提前。

But its not working for me.Every time i run the program 'Not Working' alert generates and 500 is the response stats i gets.Please make me understand that how can i call methods from webservice.Thanx in advance.

推荐答案

您将无法消耗你的SOAP Web服务以这种方式,由于执行GET请求的ASMX URL将只返回你的HTML内容的页面列出你的Web服务的方法。

You will not be able to consume your SOAP webservice in this way, since performing a GET request on the asmx url will just return you the HTML content for the page listing your webservice methods.

使用SOAP Web服务依赖于POST请求,并需要您发送一个正确的XML SOAP请求。我可能会建议你使用像 http://archive.plugins.jquery.com/project/jqSOAPClient 来执行你的SOAP调用和检索数据,然后将它们传递回你的内线code。

Consuming SOAP webservices relies on POST requests and need that you send a correct XML SOAP request. I may suggest you to use something like http://archive.plugins.jquery.com/project/jqSOAPClient to execute your SOAP calls and retrieve your data and then pass them back to your Ext code.

希望这有助于

Nacef

这篇关于如何消耗煎茶触摸SOAP的Web服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆