title: How to define a SoapVar namespace?
body: <p>I need to have this node in my SOAP Request (using 1.1):</p>
  
  <pre><code>&lt;CredentialsHeader xmlns="http://www.url.com/Services/P24ListingService11"
      &lt;EMail&gt;ricky@email.net&lt;/EMail&gt;
      &lt;Password&gt;password&lt;/Password&gt;
  &lt;/CredentialsHeader&gt;
  </code></pre>
  
  <p>So I have the following PHP:</p>
  
  <pre><code>$client = new SoapClient("https://exdev.www.example.com/Services/example.asmx?WSDL", 
      array(
          "trace"      =&gt; 1,
          "exceptions" =&gt; 0,
          "cache_wsdl" =&gt; 0,
          'soap_version' =&gt; SOAP_1_1
          )
  );
  
  $CredentialObject = new SoapVar(array('EMail' =&gt; 'ricky@email.net', 'Password' =&gt; 'password'), SOAP_ENC_OBJECT);
  </code></pre>
  
  <p>Which generates: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.example.com/Services/Example"&gt;
      &lt;SOAP-ENV:Header&gt;
          &lt;ns1:CredentialsHeader&gt;
              &lt;EMail&gt;ricky@email.net&lt;/EMail&gt;
              &lt;Password&gt;password&lt;/Password&gt;
          &lt;/ns1:CredentialsHeader&gt;
      &lt;/SOAP-ENV:Header&gt;
      &lt;SOAP-ENV:Body&gt;
          &lt;ns1:EchoAuthenticated/&gt;
      &lt;/SOAP-ENV:Body&gt;
  &lt;/SOAP-ENV:Envelope&gt;
  </code></pre>
  
  <p>All I need to do is prevent it using <code>ns1</code> and actually define the <code>xmlns</code> in the node like so:</p>
  
  <pre><code>&lt;CredentialsHeader xmlns="http://www.example.com/Services/Example"&gt;
          &lt;EMail&gt;ricky@email.net&lt;/EMail&gt;
          &lt;Password&gt;password&lt;/Password&gt;
      &lt;/CredentialsHeader&gt;
  </code></pre>
  
  <p>I have tested that in Firefox Poster and know for a fact that change fixes the problem.</p>