簡體   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