RE: [SOAP] Apache Basic Authentication PEAR::SOAP Client
| From: | Mike Carter | Date: | Mon, 19 May 2003 15:25:41 +0000 |
| Subject: | RE: [SOAP] Apache Basic Authentication PEAR::SOAP Client | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-607@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: anthony@acolebourne.co.uk [mailto:anthony@acolebourne.co.uk]
>
> Hi,
>
> I've wrote a PEAR::SOAP web service server and I've protected
> it using a htaccess file Basic Authentication.
>
> I cannot get my PEAR::SOAP Client working.
>
> I've tried addHeader(), however I don't know that parameters
> I should use to create the SOAP_Header.
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);
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
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.480 / Virus Database: 276 - Release Date: 5/12/2003
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________