如何做wcf路由服务使用xpath? [英] How to do wcf routing service using xpath?

查看:365
本文介绍了如何做wcf路由服务使用xpath?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个wcf项目,需要做一些路由的东西。一个场景是,是做一个服务版本控制。因此,例如,如果需要对正在中断的wcf服务上的新客户端执行更改或需要实施新服务,那么我将为新客户端使用的服务端点创建不同的服务端点。 Bu的事情是老客户端应该仍然能够与旧版本的服务进行通信(这就是服务版本控制应该如何正确?)。为此,我决定使用XPath方法使用wcf路由服务。

I have a wcf project that needs to do some routing stuff. One scenario there is, is to do a service versioning. So for example if there is a change or a new service needs to be implemented for a new client on wcf service that is breaking, I will then create a different service endpoint for that to be consumed by the new client. Bu the thing is the old client should still be able to communicate with the older version of the service(That's how service versioning should work right?). To do so, I decided to use the wcf routing service using the XPath method.

我可以使用XPath方法做两件事,要么检查数据的版本使用内容过滤或查看标头来合同。现在我想做这两个只是为了台架标记。我理解XPath将如何工作,但我不知道如何实现它。

Two things I can do with the XPath method, either to check the version on the Data Contract using content filtering or by looking at the header. Now I want to do both just for the sake of bench marking. I understand how XPath will work but I don't know how to implement it.

任何教程或示例都非常感谢。

Any tutorials or examples is greatly appreciated. Found few good examples on the web but they're not giving the full config.

最好的问候,

推荐答案

在这里找到一个好的文章,一个视频解释一切和一个可下载的源。
此处:

Found a good article here, a video explaining everything and a downloadable source. Here:

文章: http://msdn.microsoft.com/en-us/vs2010trainingcourse_whatsnewinwcf4_topic19

视频教程: http://channel9.msdn.com/Shows/10-4/10- 4-Episode-40-The-New-WCF-Routing-Service

下载源: http://az12722.vo.msecnd.net/vs2010trainingcourse2-1/labs/whatsnewinwcf41-1-0/ Source.zip

这篇关于如何做wcf路由服务使用xpath?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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