从另一个WCF服务调用WCF服务 [英] Calling WCF service from another WCF service

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

问题描述

我正在创建一个WCF服务,新服务再次调用另一个驻留在另一个位置的wcf服务。



我需要很少的关于构建服务的设计建议叫另一个服务。



我应该创建WCF服务项目(对于我的服务),然后引用WCF服务库来调用另一项服务吗?





如果网上已经有例子,请告诉我。

I am creating a WCF service, new service again calls another wcf service which is residing in another location.

I need few design suggestions on building the service which calls another service.

Should I create WCF service project (For my service) and then refer WCF service library for calling another service ?


Please let me know if there's already example in online.

推荐答案

正如谢尔盖所​​说,如果你能创建服务,你应该可以打电话给另一个服务;)



有很多例子:

WCF数据服务 [ ^ ]

托管和使用WCF服务 [ ^ ]

致电服务运营(WCF数据服务) [ ^ ]

如何:调用WCF服务操作异步 [ ^ ]

WCF:服务到服务电话 [ ^ ]

WCF Web服务调用另一个WCF Web服务不返回任何数据 [ ^ ]

从Metro应用程序调用WCF服务 - 跨机器方案 [ ^ ]
As Sergey had mentioned, if you can create service, you should be able to call another service ;)

There are tons of examples:
WCF Data Services[^]
Hosting and Consuming WCF Services[^]
Calling Service Operations (WCF Data Services)[^]
How to: Call WCF Service Operations Asynchronously[^]
WCF: Service to service call[^]
WCF Web Service Call to Another WCF Web Service returns no data[^]
Calling a WCF service from a Metro application – cross machine scenario[^]


在什么应用程序中使用服务没有区别。服务是一种服务,它可以被某些客户端部分应用程序使用。如果这个客户端本身就是一个服务,它就没有区别。

你不需要任何例子。如果您已经开发了自己的服务,至少部分地,您知道如何在某些.NET代码中使用它,否则您将无法对其进行测试。因此,您可以在服务项目中执行相同操作。

-SA
There is no difference where you consume a service, in what application. A service is a service, it can be consumed by some client-part application. If this client is itself a service, it makes no difference.
You don't need any examples. If you already developed your own service, at least partially, you know how to consume it in some .NET code, otherwise you would not be able to test it. So, you can do the same in the project of your service.
—SA


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

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