在WCF中调用Web服务 [英] Calling Web Service in WCF

查看:79
本文介绍了在WCF中调用Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在WCF中调用Web Service吗,这样我就可以在Windows应用程序中调用WCF来访问Web Service中的方法.

解决方案

是的.但是这个主意听起来很奇怪.
您应该直接从Windows应用程序调用Web服务(假设您的意思是.Net 2.0 asmx.).如果安全系统不同,就会陷入各种混乱.

http://博客. msdn.com/b/endpoint/archive/2010/01/25/using-routes-to-compose-wcf-webhttp-services.aspx [ http://seroter.wordpress .com/2011/01/09/wcf-routing-service-deep-dive-part-icomparing-to-biztalk-server/ [如何使用WCF 4.0路由器和发现服务创建可扩展服务 [ 解决方案

Yes you can. But the idea sounds strange.
You should call the Web Service (assuming you mean the .Net 2.0 asmx ones) directly from the Windows Application.


You could have a WCF service that behaves as a route, but you will get into all sorts of mess if the security systems are different.

http://blogs.msdn.com/b/endpoint/archive/2010/01/25/using-routes-to-compose-wcf-webhttp-services.aspx[^]

http://seroter.wordpress.com/2011/01/09/wcf-routing-service-deep-dive-part-icomparing-to-biztalk-server/[^]

How to create scalable services with WCF 4.0 Router and Discovery services[^]

or you have a code based service mapping to the other service. You will find that the more service hops you do, the longer it will take to complete the original call (unless all your services are cloud based, in the same cloud as it were, then it will be quite a bit quicker)

I don''t think it''s strange to have a service that calls another service. Even if the client is a windows app, or even another service. To be honest, I thought that was the whole point of webservices.


这篇关于在WCF中调用Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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