2010-04-11 77 views
1

我想從網絡服務器(.net)獲取數據並將其顯示到我的網站。與使用PHP nusoap的網絡服務獲取錯誤

我的代碼是:

$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 型或 /家庭/ mmdicir /的public_html/lib中/ nusoap-空0.7.3/lib/nusoap.php on line 7211

Array([faultcode] => soap:Server [faultstring] =>服務器 無法處理請求。 ---> 未將字符串引用設置爲字符串的 實例。參數名: S [詳細] =>)

回答

1
$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); 
+0

請添加更多的信息,爲什麼是錯誤的,不僅是馬克/改變它。 – PhoneixS 2013-02-21 09:46:55