title: Collecting/Processing headers in PHP Soap Server
body: <p>I'm creating a web service using PHP5's native SOAP Methods. Everything went fine until I tried to handle authentication using SOAP Headers.</p>
  
  <p>I could easily find how to add the username/password to the SOAP headers, <strong>client-side</strong>:</p>
  
  <pre><code>$myclient = new SoapClient($wsdl, $options);
  
  $login = new SOAPHeader($wsdl, 'email', 'mylogin');
  $password = new SOAPHeader($wsdl, 'password', 'mypassword');
  $headers = array($login, $password);
  
  $myclient-&gt;__setSOAPHeaders($headers);
  </code></pre>
  
  <p>But I can't find anywhere the methods for collecting and processing these headers <strong>server-side</strong>. I'm guessing there has to be an easy way to define a method in my SoapServer that handles the headers...</p>