Web服务发现在WCF:WS-发现或UDDI? [英] Web service discovery in WCF : Ws-Discovery or UDDI?

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

问题描述

我知道UDDI和WS-发现之间的区别(也知道地点搜寻服务VS广播)。但我的问题是:什么是发现在WCF web服务最简单的方法?通过简单的我的意思是已经落实了WCF和现在可以使用?我从来没见过的WCF任何内置的实现对UDDI或WS发现。

你有任何联系,或经验分享关于WCF这两个协议?

更新

现在我正在考虑三种解决方案,等待WS-发现在.NET 4.0,或者创建自己的发现与对等由WCF提供的绑定绑定。这样我可以广播的请求。 或者利用eed3si9n的链接提供的实现。

我想我会做一个网关接口轻松地变更执行后者。

解决方案

.NET 4.0将有WS-发现。请参阅<一href="http://developers.de/blogs/damir%5Fdobric/archive/2008/10/19/ws-discovery-messaging-enhancements-in-net-4-0.aspx" (愉第一部分)的消息在.NET 4.0中的增强功能-Discovery功能于WCF-4-0.aspx相对=nofollow>在WCF 4.0 使用WS-发现。在此期间,克劳迪奥Masieri提供一个实现。请参见 WS发现了WCF

还有一个自定义的发现实现以类似的方式,UDDI进行。请参见 Windows通信服务发现

  

假设你使用200客户端   你时髦的WCF服务。他们都   在他们的conf文件中像一节   这一个:

 &LT;客户端&GT;
   &LT;终点configurationName =默认
               地址=HTTP://localhost/servicemodelsamples/service.svc
               绑定=的wsHttpBinding
               bindingConfiguration =Binding1
              合同=IDataContractCalculator/&GT;
 &LT; /客户&GT;
 &LT;绑定&GT;
   &LT;的wsHttpBinding&GT;
      &LT;结合configurationName =Binding1/&GT;
   &LT; /的wsHttpBinding&GT;
&LT; /绑定&GT;
 

  

现在,您决定改变现有的   端点(服务器端)用一个新的   使用SSL安全原因。怎么样   你更新你的客户呢?您可以   很快发现它可以成为   乏味。所以,这个想法我想详细   这里是实现一个发现   类似于UDDI做服务,   使用元数据解析,以获得   配置了服务于   以动态创建一个代理   允许客户与讨论   该服务。

这人也有类似的问题,因为你这样做,而且似乎有一个工作的解决方案。

I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery.

Do you have any link, or experience to share about these two protocols in WCF ?

UPDATE

Now I'm thinking about three solutions, waiting for WS-discovery on .NET 4.0, or maybe creating my own discovery binding with the Peer to Peer binding provided by WCF. This way I can broadcast a request. Or using the implementation provided by the link of eed3si9n.

I think that I'll do a gateway interface to easily change implementation latter.

解决方案

.NET 4.0 will have WS-Discovery. See Messaging enhancements in .NET 4.0: (Discovery Part I) Using WS-Discovery in WCF 4.0. In the meantime, Claudio Masieri has provided an implementation. See WS-Discovery for WCF.

There's also a custom discovery implementation done in similar way as UDDI. See Windows Communication Service Discovery.

Imagine you have 200 clients using your funky Wcf service. They would all have in their conf file a section like this one:

<client>
   <endpoint configurationName="default"
               address="http://localhost/servicemodelsamples/service.svc"
               binding="wsHttpBinding"
               bindingConfiguration="Binding1"
              contract="IDataContractCalculator" />
 </client>
 <bindings>
   <wsHttpBinding>
      <binding configurationName="Binding1" />
   </wsHttpBinding>
</bindings>

Now, you decide to change the existing endpoint (server side) with a new one that uses SSL for security reason. How do you update your clients? You can quickly see that it can become tedious. So the idea I want to detail here is to implement a discovery service similar to what UDDI does and to use a metadata resolver to get the configuration out of the service in order to create dynamically a proxy allowing the client to discuss with the service.

This person has similar concern as you do, and seems to have a working solution.

这篇关于Web服务发现在WCF:WS-发现或UDDI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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