title: SoapClient set custom HTTP Header
body: <p>I am doing some work writing a PHP-based SOAP client application that uses the SOAP libraries native to PHP5.  I need to send a an HTTP cookie and an additional HTTP header as part of the request.  The cookie part is no problem:</p>
  
  <p>Code:</p>
  
  <pre><code>$client = new SoapClient($webServiceURI, array("exceptions" =&gt; 0, "trace" =&gt; 1, "encoding" =&gt; $phpInternalEncoding));
  $client-&gt;__setCookie($kkey, $vvalue);
  </code></pre>
  
  <p>My problem is the HTTP header.  I was hoping there would have been a function named</p>
  
  <p><strong>__setHeader</strong></p>
  
  <p>or</p>
  
  <p><strong>__setHttpHeader</strong></p>
  
  <p>in the SOAP libraries.  But no such luck. </p>
  
  <p>Anyone else dealt with this?  Is there a workaround?  Would a different SOAP library be easier to work with?  Thanks.</p>
  
  <p><sub>
  (I found this unanswerd question here <a href="http://www.phpfreaks.com/forums/index.php?topic=125387.0" rel="noreferrer">http://www.phpfreaks.com/forums/index.php?topic=125387.0</a>, I copied it b/c i've the same issue)</sub></p>