Re: [SOAP] Apache Basic Authentication PEAR::SOAP Client
| From: | Jan Schneider | Date: | Mon, 19 May 2003 16:30:13 +0000 |
| Subject: | Re: [SOAP] Apache Basic Authentication PEAR::SOAP Client | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-610@lists.php.net to get a copy of this message | ||
Zitat von Anthony <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.
This is how our wrapper looks like:
function request($url, $method, $params = null, $options = array())
{
if (!isset($options['timeout'])) {
$options['timeout'] = 5;
}
if (!isset($options['allowRedirects'])) {
$options['allowRedirects'] = true;
$options['maxRedirects'] = 3;
}
if (!empty($options['user'])) {
$options['headers']['Authorization'] = 'Basic ' .
base64_encode($opptions['user'] . ':' . $options['pass']);
}
require_once 'SOAP/Client.php';
require_once HORDE_BASE . '/lib/version.php';
$soap = &new SOAP_Client($url, false, false, $options);
return $soap->call($method, $params, $options['namespace']);
}
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft