Index: modules/soapclient/soapclient.module
===================================================================
--- modules/soapclient/soapclient.module	(revision 11)
+++ modules/soapclient/soapclient.module	(working copy)
@@ -473,6 +473,12 @@ function soapclient_get_libname()
 *   - headers : optional string of XML with SOAP header content, or
 *               array of soapval objects for SOAP headers
 * 
+*   The following options are used in the __setSoapHeaders() method for PHP 5
+*   library.
+*
+*   - headers : array of name => data pairs, note that namespace is
+*               required when supplying headers.
+*
 *   For additional options, please consult the PHP5 manual or the
 *   NuSOAP manual for details.
 * 
@@ -741,4 +747,4 @@ function soapclient_object_to_array($obj
   }
   
   return $ret;
-}
\ No newline at end of file
+}
Index: modules/soapclient/lib/drupal_soap_client.inc
===================================================================
--- modules/soapclient/lib/drupal_soap_client.inc	(revision 18)
+++ modules/soapclient/lib/drupal_soap_client.inc	(working copy)
@@ -86,6 +86,17 @@ class DrupalSoapClient
     }
     else if ( $this->library == 'PHP5SOAP' )
     {
+      if (isset($this->options['headers']) && is_array($this->options['headers'])) {
+	try {
+	  $header = array();
+	  foreach ($this->options['headers'] as $name => $data) {
+	    $header[] = new SoapHeader($this->options['namespace'], $name, $data);
+	  }
+	  $this->client->__setSoapHeaders($header);
+	} catch (Exception $e) {
+	  $result['#error'] = t($e->getMessage());
+	}
+      }
       try
       {
         $result['#return'] = $this->client->$function($params);
