简体   繁体   English

使用php nusoap进行Web服务时出错

[英]get error with using php nusoap for web service

i want get data from a webserver (.net) and display it into my website. 我想从Web服务器(.net)获取数据并将其显示到我的网站中。

my code is : 我的代码是:

$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection(); 

$user = array('UserName' => 'etc');
$pass = array('Password' => 'etc');

$result = $client->call('Board', $user, $pass);

print_r( $result );

and i get this error : 我得到这个错误:

Warning: Illegal offset type in isset or empty in /home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php on line 7211 警告:isset中的偏移量类型非法,或者在7211行的/home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php中为空

Array ( [faultcode] => soap:Server [faultstring] => Server was unable to process request. ---> String reference not set to an instance of a String. Parameter name: s [detail] => ) Array([faultcode] => soap:Server [faultstring] =>服务器无法处理请求。--->字符串引用未设置为String的实例。参数名称:s [detail] =>)

$client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true);
$client->useHTTPPersistentConnection(); 

$user = array('UserName' => 'etc', 'Password' => 'etc'); use like this its will work
//$pass = array('Password' => 'etc'); // wrong

$result = $client->call('Board', $user, $pass);

print_r( $result );

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM