Web服务发现在WCF:WS-发现或UDDI?现在、发现、Web、WCF

2023-09-03 12:33:05 作者:锄禾日了当午

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

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

更新的

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

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

解决方案

.NET 4.0将有WS-发现。请参阅在WCF 4.0 使用WS-发现。在此期间,克劳迪奥Masieri提供一个实现。请参见 WS发现了WCF 。

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

  

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

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

  WebService WCF WebAPI之间的区别

现在,您决定改变现有的   端点(服务器端)用一个新的   使用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.

 
精彩推荐
图片推荐