The header is added via message inspector which implements IClientMessageInspector in method
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
var reqMsgProperty = new HttpRequestMessageProperty();
reqMsgProperty.Headers.Add("SOAPAction", "SendEcho");
reqMsgProperty.Headers.Add("Content-Type", "text/xml;charset=UTF-8");
request.Properties[HttpRequestMessageProperty.Name] = reqMsgProperty;
//...
return null;
}
But still it returns this weird message:
The SOAP action specified on the message, '"SendEcho"', does not match the action specified on the HttpRequestMessageProperty, 'SendEcho'.
Is it possible that this header should be added in some other way so it wouldn't have the double quotes surrounding it like a string? If yes then how?