title: Remove WS-Addressing/WS-Security sections from WSE 3.0 Client request
body: <p>I've got a simple C# web service proxy class that I created with WSDL.exe.  I am invoking a method on the remote web service, and it is including a bunch of WS-Addressing and WS-Security headers that I do not want (and that the server is choking on).  Here is an example of the raw soap request:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" 
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" 
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"&gt;
    &lt;soap:Header&gt;
      &lt;wsa:Action&gt;&lt;/wsa:Action&gt;
      &lt;wsa:MessageID&gt;urn:uuid:22f12267-b162-4703-a451-2d1c5c5a619b&lt;/wsa:MessageID&gt;
      &lt;wsa:To&gt;http://example.com/wstest&lt;/wsa:To&gt;
      &lt;wsse:Security&gt;
        &lt;wsu:Timestamp wsu:Id="Timestamp-5c9f0ef0-ab45-421d-a633-4c4fad26d945"&gt;
          &lt;wsu:Created&gt;2009-04-15T16:27:25Z&lt;/wsu:Created&gt;
          &lt;wsu:Expires&gt;2009-04-15T16:32:25Z&lt;/wsu:Expires&gt;
        &lt;/wsu:Timestamp&gt;
      &lt;/wsse:Security&gt;
    &lt;/soap:Header&gt;
    &lt;soap:Body&gt;
      &lt;Func1 xmlns="http://example.com"&gt;
        &lt;arg_1 xmlns=""&gt;blah&lt;/arg_1&gt;
        &lt;arg_2 xmlns=""&gt;blah2&lt;/arg_2&gt;&lt;/arg_2&gt;
      &lt;/Func1&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>But <strong>I don't care about the WS-Addressing/WS-Security stuff</strong>.  I've done nothing to include it.  The .NET WSE 3.0 package seems to be adding them by default.  Is there any way to get rid of these?  I can see no properties on my proxy object that allow me to remove these sections.  I've tried:</p>
  
  <pre><code>proxyObject.Addressing.Clear();
  proxyObject.Security.Clear();
  </code></pre>
  
  <p>Those cause a null reference exception when I invoke my web service method.</p>
  
  <p>I want the SOAP request to look like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;soap:Envelope 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;soap:Header&gt;
    &lt;/soap:Header&gt;
    &lt;soap:Body&gt;
      &lt;Func1 xmlns="http://example.com"&gt;
        &lt;arg_1 xmlns=""&gt;blah&lt;/arg_1&gt;
        &lt;arg_2 xmlns=""&gt;blah2&lt;/arg_2&gt;&lt;/arg_2&gt;
      &lt;/Func1&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Thanks in advance</p>