Re: [SOAP] Apache Basic Authentication PEAR::SOAP Client

From: Date: Mon, 19 May 2003 17:11:58 +0000
Subject: Re: [SOAP] Apache Basic Authentication PEAR::SOAP Client
References: 1  Groups: php.soap 
Request: Send a blank email to php-soap+get-613@lists.php.net to get a copy of this message
Mike Carter wrote:
I had to make the SOAP client pass a unique 'key' in the header of all SOAP requests sent to our SOAP server. This was achieved by doing: $ourHeader = new SOAP_Header('TokenHeader', 'Struct', array('InnerToken' => $this->userToken), false); $ourHeader->attributes['xmlns'] = "http://www.adomain.co.uk/services"; // get from $this->fqn() ?? $this->addHeader($ourHeader);
You should be able to do: SOAP_Header('TokenHeader', 'Struct', array('{http://www.adomain.co.uk/services}InnerToken' => $this->userToken), false);
It's a bit hacky having the xmlns hardcoded like this though, I thought it might have been possible to get it from the 'fqn' attribute. I've not had time to look into this more. IT works for now. Regards, Mike C


« previous php.soap (#613) next »