繁体   English   中英

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

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

我想从Web服务器(.net)获取数据并将其显示到我的网站中。

我的代码是:

$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 );

我得到这个错误:

警告:isset中的偏移量类型非法,或者在7211行的/home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php中为空

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