php: soap client, get data from class
Hi,
i run soap client:
$dir = "http://address.com/?Version=1.0,wsdl=1";
$client = new SoapClient($dir, array('login' => "test", 'password' => "test"));
Test, print_r($client):
SoapClient Object
(
[_login] => test
[_password] => test
[_soap_version] => 1
[sdl] => Resource id #3
)
And in this server is class:
all_user
* return: array
* access: public
all_user_dt[] get_user(string $id)
* string $id
how get information from this class? I try:
$client->get_user('213');
But i get error:
Fatal error: Uncaught SoapFault exception: [HTTP] Unauthorized in C:\www\index.php:38 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...
Lolalola
Junior Poster in Training
76 posts since Jul 2009
Reputation Points: 10
Solved Threads: 0
Perhaps you need to login first, before you can retrieve user information. See the specifications of your service. The flow of requests should be described.
pritaeas
Posting Expert
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875