How can I add a namespace to soap envelope in c#
问题 I want to add a namespace setting to my soap envelope. I would like to change it in the BeforeSendRequest in an IClientMessageInspector or you have a more elegant way. For example <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"> <s:Header> <wsa:To xmlns="http://www.w3.org/2005/08/addressing">ws://xxx/V1</wsa:To> ... </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ... </s:Body> </s:Envelope> to <s:Envelope