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.
精彩评论