问题
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.
回答1:
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 to basicHttpBinding
. Default configuration of wsHttpBinding
uses advanced security and ASMX doesn't support it.
来源:https://stackoverflow.com/questions/6649588/wshttpbinding-on-the-wcf-service-and-web-reference-on-the-client-dont-work