Web服务是推送还是拉动过程 [英] Is webservice a push or pull process

查看:66
本文介绍了Web服务是推送还是拉动过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我只是想知道webservice是推还是拉过程?



如果它是推送过程那么我们是否必须使用拉取过程从某个地方获取数据?



如果我们没有拉动过程那么我们怎么办?得到数据?



请解释一下我给出一些例子!!



问候,

Krunal Panchal

Hello everyone,

I just want to know that webservice is whether push or pull process??

if it is push process then do we have to use pull process for getting data from somewhere??

and if we dont have pull process then how do we get data??

please explain me giving some example!!

Regards,
Krunal Panchal

推荐答案





好​​吧,如果您提到WCF服务,请参阅以下博客文章:拉不推送。有关Web服务的一般信息,请参阅以下内容: Web Services



调用应用程序示例[PULL]:



请注意,我假设您已经创建了将Web服务添加到调用应用程序。

Hi,

Well, if your referring to WCF services, please refer to the following blog post: Pull Not Push. For general information on web services, please refer to the following: Web Services

Calling Application Example [PULL]:

Please take note that, I assumed that you already created and added the web service to the calling application.
<br />
<pre><br />
        private string _serviceAddress = string.Empty;<br />
        private string _baseAddress = "http://localhost:12345/Service1.svc";<br />
        private System.ServiceModel.WSHttpBinding _binding;<br />
        private System.ServiceModel.EndpointAddress _address;<br />
<br />
        public void Init()<br />
        {<br />
            this._binding = new System.ServiceModel.WSHttpBinding();<br />
            this._address = new System.ServiceModel.EndpointAddress(this._baseAddress);<br />
        }<br />
<br />
        public bool PerformWork(object someData)<br />
        {            <br />
            WebServiceReference.ServiceClient client = new WebServiceReference.ServiceClientQmuzikSales.ServiceQmuzikSalesClient(this._binding, this._address);<br />
            return client.DoWork(someData);<br />
        }<br />
</pre><br />





亲切问候,



Kind regards,


拉 - 网络服务无法采取行动没有客户的要求。
Pull - a web service cannot act without a request from a client.


这篇关于Web服务是推送还是拉动过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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