开发者

php: soap client, get data from class

开发者 https://www.devze.com 2023-01-30 21:19 出处:网络
i run soap client: $dir = \"http://address.com/?Version=1.0,wsdl=1\"; $client = new SoapClient($dir); And in this server is class:

i run soap client:

$dir = "http://address.com/?Version=1.0,wsdl=1";

$client = new SoapClient($dir);

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->all_user->get_user('213');

But is wrong, 开发者_运维百科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="...' ...


"Uncaught SoapFault exception: HTTP Unauthorized ..." So I guess you're not allowed.
Tell SoapClient how to authenticate using the $options parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消