Dynamic Assisgnment of the SOAP Header

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
argreway
Forum Newbie
Posts: 1
Joined: Thu Apr 26, 2007 11:38 am

Dynamic Assisgnment of the SOAP Header

Post by argreway »

Does anyone know how to modify a SOAP header after the header handler has been called? In PEAR::SOAP one was able to return a reference to a variable that would hold the SOAP header so it could be modified after the handler returned. Ex:

class MethodWithHeaders
{
public $sessionKey;

/**
* HeaderA SOAP header

*/

public function &header($string)
{
//Return By reference so we can modify latter
return $this->sessionKey;
}

public function input($in)
{
//Null out sessionKey
$this->sessionKey=””;
}

....
....
};

In PEAR::SOAP the input method could modify the sessionKey after the header function was called because it was returned as a reference. I've tried this with the new PHP5 SOAP extension but it does not work and I can not find a way to modify the SOAP header after the header function has returned. Any ideas???????

Thanks,

Tony
Post Reply