954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

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
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: