title: gSOAP WSSE Header missing xmlns namespace declarations
body: <p>I have a problem generating a gSOAP security header (WSSE). I have compiled all the necessary file and used the following calls to add the WSSE security header to the request:</p>
  
  <pre><code>soap_wsse_add_Security(proxy.soap);
  soap_wsse_add_UsernameTokenText(proxy.soap, "UsernameToken-1", "user","passwd");
  </code></pre>
  
  <p>My security header comes out looking like this:</p>
  
  <pre><code>&lt;SOAP-ENV:Header&gt;
    &lt;wsse:Security SOAP-ENV:mustUnderstand="true"&gt;
      &lt;wsse:UsernameToken wsu:Id="UsernameToken-1"&gt;
        &lt;wsse:Username&gt;testuser&lt;/wsse:Username&gt;
        &lt;wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"&gt;
      testPassword&lt;/wsse:Password&gt;
      &lt;/wsse:UsernameToken&gt;
    &lt;/wsse:Security&gt;
  &lt;/SOAP-ENV:Header&gt;
  </code></pre>
  
  <p>Compared to the server specification I was provided, the line </p>
  
  <pre><code>&lt;wsse:Security SOAP-ENV:mustUnderstand="true"&gt;
  </code></pre>
  
  <p>is missing the <strong>xmlns:wsse="http...."</strong> 
  and the line </p>
  
  <pre><code>&lt;wsse:UsernameToken wsu:Id="UsernameToken-1"&gt;
  </code></pre>
  
  <p>is missing the <strong>xmlns:wsu="http...."</strong> parts.
  So I want the to look like this:</p>
  
  <pre><code> &lt;wsse:Security  xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"  SOAP-ENV:mustUnderstand="true"&gt;
    &lt;wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"  wsu:Id="UsernameToken-1"&gt;
  </code></pre>
  
  <p>How do I add the xmlns:wsse and xmlns:wsu parts to the specific lines to be inline with the spec? The error I get from the service is:</p>
  
  <pre><code>com.ctc.wstx.exc.WstxParsingException: Undeclared namespace
      prefix "wsse"
  </code></pre>
  
  <p>I have looked at the gSOAP documentation but all I could find was how to add a header, nothing on how to add namespace definitions to the items in the header.</p>
  
  <p>Assistance will be appreciated. </p>