我正在为一个非WCF服务编写WCF客户端。出现了一个错误,即未处理的'mustUnderstand'头元素:{http://www.w3.org/2005/08/addressing}Action,因为请求SOAP包含带有mustunderstand='true'的头部。我必须将其设置为false或删除整个头部。你能告诉我如何做吗?
以下是绑定代码:
以下是绑定代码:
var transportElement = new HttpsTransportBindingElement();
transportElement.AuthenticationScheme = AuthenticationSchemes.Basic;
var messegeElement = new TextMessageEncodingBindingElement();
messegeElement.MessageVersion = MessageVersion.CreateVersion(EnvelopeVersion.Soap11);
var binding = new CustomBinding(messegeElement, transportElement);
return binding;