How to do wcf routing service using xpath?

北城以北 提交于 2019-12-11 16:50:17

问题


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.

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.

Best regards,


回答1:


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

Article: http://msdn.microsoft.com/en-us/vs2010trainingcourse_whatsnewinwcf4_topic19

Video tutorial: http://channel9.msdn.com/Shows/10-4/10-4-Episode-40-The-New-WCF-Routing-Service

Download source: http://az12722.vo.msecnd.net/vs2010trainingcourse2-1/labs/whatsnewinwcf41-1-0/Source.zip



来源:https://stackoverflow.com/questions/10899657/how-to-do-wcf-routing-service-using-xpath

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!