title: SOAP set proper xmlns headers
body: <p>I have a two fold problem with setting SOAP headers.  Primarily, I've never done it before and two, I can't seem to find a good solution on here for doing so.  I apologize if there are exact duplicates, and please point me in the right direction if there are.</p>
  
  <p>I need to set the following xmlns:xsi and xmlns:xsd data sets on the soap:Envelope.  I also need to set an xmlns attribute on the first tag in the XML (rough example).</p>
  
  <p>The first part needs to be added, the second part is already in there when I do a __getLastRequest().  And the third part needs to be added (just the SendPurchases xmlns attribute).</p>
  
  <pre><code>&lt;soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  
  
  &lt;SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
  xmlns:ns1="urn:[taken out for security purposes]"&gt;
  
  
  &lt;soap:Body&gt;
      &lt;SendPurchases xmlns="urn:..."&gt;
      &lt;/SendPurchases&gt;
  &lt;/soap:Body&gt;
  </code></pre>
  
  <p>Would I need to use the header() for this?
  I am using PHP's SOAP client.  Any help at all is greatly appreciated!</p>
  
  <p>EDIT:</p>
  
  <p>I went with another route, thank you for all your answers though!</p>