WCF 4 服务的扁平 WSDL
使用 WCF 3.5 和 Christian 的 FlatWsdl EndpointBehavior Weyer,我能够为我的 WCF 服务获取单个平面 WSDL 文件,而无需任何
指令。
现在,对于 WCF 4,由于某种原因,这不再起作用。
我已经尝试了很多博客文章中描述的所有内容,包括使用 WcfExtras 行为扩展。
他们都指的是 Chr。 Weyers 解决方案或推荐 WcfExtras。 我还确保为绑定、ServiceContract 和 ServiceBehavior 指定了相同的命名空间。
在自定义服务主机中,当即将注入FlatWsdlExtension时,Description.Endpoints集合始终为空。我尝试使用或不使用地址来配置我的服务端点,但到目前为止还没有成功。
我需要做什么才能为我的 WCF 4 服务获取单一的平面 WSDL?
感谢您的任何答复。
Using WCF 3.5 and the FlatWsdl EndpointBehavior from Christian Weyer, I was able to get a single flat WSDL file for my WCF services without any <import>
directives.
Now with WCF 4, this doesn't work anymore for some reason.
I have tried everything described in a lot of blog entries including using the WcfExtras behavior extension.
They all either refer to Chr. Weyers solution or recommend the WcfExtras.
I also made sure I specified the same namespace for the binding, ServiceContract and ServiceBehavior.
In the custom service host, when the FlatWsdlExtension is about to be injected, the Description.Endpoints collection is always empty. I tried to configure my service endpoint with or without an adress, so far without luck.
What do I need to do in order to get a single flat WSDL for my WCF 4 service?
Thanks for any answers.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了这个确切问题。经过今天的多次尝试,我终于通过执行以下操作使其工作:
我今天尝试了 WcfExtras 等其他东西 - 可能或多或少,但这些步骤最终让我继续前进。祝你好运!
[编辑]
I was having this exact problem. After several attempts today, I finally got it to work by doing the following:
I tried WcfExtras among other things today -- there may be more or less to it, but these steps finally got me going. Good luck!
[edit]
迟来的回答,希望对大家有帮助。
遇到了同样的问题,通过手动将行为添加到服务端点来解决它:
Late answer, hope it helps someone.
Had the same issue, solved it by manually adding the behavior to the serviceendpoint: