从WCF请求中删除ActivityId [英] Remove ActivityId from WCF Request

查看:65
本文介绍了从WCF请求中删除ActivityId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WCF客户端和Java Web服务之间存在一个有趣的兼容性问题.简而言之,我发现生成标头的方式导致了问题-标头中的ActivityId和Action元素以及WCF对自定义标头的名称空间所做的操作都引起了问题.我已经用wsdl.exe成功使用了WSDL,但是WCF似乎正在以Java Web服务不喜欢的方式操纵标头.有什么方法可以为WCF客户端设置绑定,以不发送ActivityId和Action元素?

I'm having an interesting compatibility issue between a WCF client and a Java web service. In short I've found that the way the header is generated is causing the problem - the ActivityId and Action elements in the header as well as what WCF is doing with the namespace of the custom header is causing issues. I've successfully consumed the WSDL with wsdl.exe, but WCF seems to be manipulating the header in a way that the Java web service doesn't like. Is there any way I can set up the bindings for the WCF client to not send the ActivityId and Action elements?

推荐答案

您是否在客户端中打开了跟踪?我认为这就是添加活动ID的原因,因为它试图将跟踪活动流到服务以进行端到端跟踪.关闭活动跟踪标记,它应该会消失-请参阅我对动作标题的评论

Do you have tracing turned on in the client? I think that is what is adding the activity ID as its trying to flow the tracing activity to the service for end to end tracing. Turn off the activity tracing flag and it should go - see my comment for the action header

这篇关于从WCF请求中删除ActivityId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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