XPath筛选器WCF路由 [英] XPath filter WCF Routing

查看:72
本文介绍了XPath筛选器WCF路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我在使用Xpath过滤器时遇到了一些问题.

来自客户端的消息会锁定,例如: 

{< s: xmlns:s = " http://www.w3.org/2003/05/soap-envelope" " http://www.w3.org/2005/08/addressing"

{<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">

         ; < s: 标头

         <s:Header

         ;        < a: 操作 s:mustUnderstand = " 1" //tempuri.org/IFormularService/GetData</a:Action> 

                 <a:Action s:mustUnderstand="1">http://tempuri.org/IFormularService/GetData</a:Action> 

         ;        < a: MessageID > urn:uuid: 82356057 -cc06-

                 <a:MessageID>urn:uuid:82356057-cc06-46e9-ba49-795c7e2f0faf</a:MessageID>

         ;        < a: ReplyTo >    

                 <a:ReplyTo>    

         ;                < a: 地址 > http: //www.w3.org/2005/08 /addressing/anonymous</a:地址> 

                          <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address> 

;        </a: ReplyTo >  

                 </a:ReplyTo>  

         ;        < VsDebuggerCausalityData xmlns = " http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink"" VsDebuggerCausalityData

                 <VsDebuggerCausalityData xmlns="http://schemas.microsoft.com/vstudio/diagnostics/servicemodelsink">uIDPo26NFlvGLY9IkCvYUKTGdSwAAAAAcQNGbfwrjka+YDRBUx7kkzBu5NRuxpFJko4mTzDKkwYACQAA</VsDebuggerCausalityData

         ;        < a: s:mustUnderstand = " 1" > net.tcp: //localhost:8733/Design_Time_Addresses/Routing/</a:To> 

                 <a:To s:mustUnderstand="1">net.tcp://localhost:8733/Design_Time_Addresses/Routing/</a:To> 

         ; </s: Header >

         </s:Header>

         ; < s: 正文 >  

         <s:Body>  

         ;        < GetData xmlns = " http://tempuri.org/> ;   

                 <GetData xmlns="http://tempuri.org/">    

         ;                < sc> f50ee423-b95b- 4bbc

                          <sc>f50ee423-b95b-4bbc-8af6-558ba7a58b94</sc>  

         ;                < Tenant > awd</ Tenant

                          <Tenant>awd</Tenant

         ;        </ GetData

                 </GetData

         ; </s: 正文 >

 </s: 信封 推荐答案

嗨Aurillion,

Hi Aurillion,

您是否分别为Action和"sc"完成了过滤器工作?如果是这样,我建议你和filterType.这是一个简单的配置.

Did you achieve separate Filter work for Action and "sc"? If so, I would suggest you And filterType. Here is a simple configuration.

<filters>
        <filter name="RegisterEventFilter" filterType="Action" filterData="http://Seroter.WcfRoutingDemos/RegisterEvent"/>
        <filter name="RegisterAttendeeFilter" filterType="Action" filterData="http://Seroter.WcfRoutingDemos/RegisterAttendee"/>
        <filter name="CAEventFilter" filterType="XPath" filterData="//custom:EventLocation='CA' or //custom:AttendeeCount > 50"/>
        <filter name="WAEventFilter" filterType="XPath" filterData="//custom:EventLocation='WA'"/>
        <!-- *and* filter -->
        <filter name="RegisterAndCAFilter" filterType="And" filter1="RegisterEventFilter" filter2="CAEventFilter"/>
        <filter name="RegisterAndWAFilter" filterType="And" filter1="RegisterEventFilter" filter2="WAEventFilter"/>
</filters>

如果没有,您能否与我们分享哪一个无效?有关邮件过滤器的更多信息,建议您参考以下链接:

If not, could you share us which one did not work? For more information about Message Filters, I suggest you refer the link below:

#邮件过滤器
https://msdn.microsoft.com/en-us/library/ee517424 (v = vs.110).aspx

# Message Filters
https://msdn.microsoft.com/en-us/library/ee517424(v=vs.110).aspx

使用WCF客户端,两个服务和路由服务的简单解决方案会很有帮助,然后我们可以与您紧密合作.

A simple solution with WCF Client, Two Service and Routing service would be much helpful, and then we could work closely with you.

最好的问候,

Best Regards,

爱德华


这篇关于XPath筛选器WCF路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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