RE: [SOAP] No SOAPAction
| From: | LIMBOURG Arnaud | Date: | Wed, 07 May 2003 06:30:56 +0000 |
| Subject: | RE: [SOAP] No SOAPAction | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-580@lists.php.net to get a copy of this message | ||
Can you do a var_dump($options) in Transport/HTTP.php sendHttps method ?
I'm confused by this not working.
The following code works
class toto
{
var $__optionCategories = array('curl');
var $__options = array();
/**
* Constructor
*
* @access protected
*/
function toto()
{
}
function setOpt($category, $option, $value=NULL)
{
if ($value) {
if (in_array($category, $this->__optionCategories)) {
$this->__options[$category][$option] = $value;
}
} else {
$this->__options[$category] = $option;
}
}
}
$toto=& new Toto();
$toto->setOpt('curl', CURLOPT_VERBOSE, 1);
print_r($toto);
while (list($key, $val) = each ($toto->__options['curl'])) {
print("$key, $val\n");
}
Apparently the options get screwed up at some point, or it's something else.
Arnaud.
> I'm just trying out the actual SOAP Client.php lib version $Id:
> Client.php,v 1.57 2003/04/20 23:05:28 shane Exp $.
>
> It should connect to a server through HTTPS, connect to the
> webservice
> and get the response.
>
> Problems:
> Trying to set cURL options. The second and third throw
>
> Warning: Cannot use a scalar value as an array in
> /usr/share/pear/SOAP/Client.php on line 311
>
> Warning: Variable passed to reset() is not an array or object in
> /usr/share/pear/SOAP/Transport/HTTP.php on line 502
>
> Warning: Variable passed to each() is not an array or object in
> /usr/share/pear/SOAP/Transport/HTTP.php on line 503
>
>
> $soapclient->setOpt('curl',CURLOPT_VERBOSE, 1);
>
> //$soapclient->setOpt('curl',CURLOPT_SSL_VERIFYHOST, 0);
>
> //$soapclient->setOpt('curl',CURLOPT_SSL_VERIFYPEER, 0);
>
> $soapclient->setOpt('curl',CURLOPT_USERPWD, "username:password");
>
> Trying to set the SOAPAction parameter:
>
> 1st try:
> $options = array('trace' => 1, 'soapaction' =>
> 'urn:my-url','namespace'
> => 'urn:my-namespace');
> $ret = $soapclient->call("GetProducts",$params = array(),$options);
>
> 2nd try:
> $ret = $soapclient->call("GetProducts",$params =
> array(),'my-namespace','my-url');
>
> When watching the logs the SOAPAction header is always empty.
>
> Any hints?
>
> Thanks for your help,
> Alexander
>
>
> --
> _________________________________
> Alexander Czernay
> IT-Consulting & Media Development
>
> fon +49-40-41096742
> fax +49-40-41096743
> icq 4773650
>
> alexander@czernay.com
> www.czernay.com
> _________________________________
>
>
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>