Re: how to handle SoapServer response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dArignac wrote:
> So for the call of login it should be this, shouldn't it?:
> 
> $result = $this->soapClient->login(array(array('username' => $username,
> 'password' => $password)));
> 

No. If you look at the function and type definitions, you will see that
the login function takes 1 parameter which is a structure containing
username and password. The way you originally passing it was correct:
$result = $this->saopClient->login(array('username' => $username,
'password' => $password));

> Unfortunatly this tells me that the username property is not set. So I tried
> it with a class having a username and password property:
> 
> class LoginContainer {
> 	public $username;
> 	public $password;
> }
> ...
> $login = new LoginContainer();
> $login->username = $username;
> $login->password = $password;		
> $result = $this->soapClient->login($login);
> 
> But this does not work too as the $login value always is a stdClass with no
> vars and functions in the login function on the server.
> So what is the correct way to put in the values?
> Thanks in advance!

Unless you made any changes to your WSDL or using the wrong server code,
the above should and does work correctly.

Rob

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux