wcf 服务上的 wsHttpBinding 和客户端上的 Web 引用不起作用
我正在将 wsHttpBinding
与 WCF 服务一起使用。
我添加了一个 Web 引用,并且获得了 Web 代理(它基于 SoapHttpClientProtocol
)。
另外,我尝试使用 wsdl.exe
和 wcf 服务生成的实际 wsdl 构建代理(http://zzzz/zz.svc?wsdl)。
当客户端调用服务时,我收到以下错误:
消息上指定的 SOAP 操作“”与 HTTP SOAP 操作“http://tempuri.org/Service1/Operation1”不匹配。< /code>
为什么客户端(Web 代理)无法使用我的 WCF 服务?
我应该采取什么步骤才能让它们发挥作用?
我正在运行 .NET FW 3.5 和 ASP.NET 2.0。
I am using wsHttpBinding
with a WCF service.
I've added a web reference and I've got the web proxy (it is based on SoapHttpClientProtocol
).
Also I've tried to build a proxy using wsdl.exe
and the actual wsdl generated by the wcf service (http://zzzz/zz.svc?wsdl).
When the client calls the service, I get the following error:
The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/Service1/Operation1'.
Why doesn't the client (the web proxy) work with my WCF service?
What steps should I take to make them work?
I am running .NET FW 3.5 and ASP.NET 2.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法使用旧 ASMX 代理使用默认配置在
wsHttpBinding
上公开的服务。您必须使用添加服务引用 / svcutil 或将绑定更改为basicHttpBinding
。wsHttpBinding
的默认配置使用高级安全性,而 ASMX 不支持它。You cannot consume service exposed on
wsHttpBinding
with default configuration by old ASMX proxy. You must either use add service reference / svcutil or change your binding tobasicHttpBinding
. Default configuration ofwsHttpBinding
uses advanced security and ASMX doesn't support it.