2013-03-26 59 views
1

我一直在嘗試學習如何使用PHP訪問Web知識的SOAP服務。我使用下面的代碼,我從https://gist.github.com/domoritz/2012629下載。使用PHP訪問知識網絡的SOAP服務

<?php 
$auth_url = "http://search.isiknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl"; 
$auth_client = @new SoapClient($auth_url); 
$auth_response = $auth_client->authenticate(); 

$search_url = "http://search.isiknowledge.com/esti/wokmws/ws/WokSearchLite?wsdl"; 
$search_client = @new SoapClient($search_url); 
$search_client->__setCookie('SID',$auth_response->return); 

$search_array = array(
'queryParameters' => array(
'databaseID' => 'WOS', 
'userQuery' => 'AU=Douglas T*', 
'editions' => array(
array('collection' => 'WOS', 'edition' => 'SSCI'), 
array('collection' => 'WOS', 'edition' => 'SCI') 
), 
'queryLanguage' => 'en' 
), 
'retrieveParameters' => array(
'count' => '5', 
'fields' => array(
array('name' => 'Date', 'sort' => 'D') 
), 
'firstRecord' => '1' 
) 
); 

try{ 
$search_response = $search_client->search($search_array); 
} catch (Exception $e) { 
echo $e->getMessage(); 
} 

print_r($search_response); 
?> 

該代碼似乎工作。但是,我收到的$search_response是 「用戶沒有該服務級別的權利 - WOKSearchLight」。我試圖從一個可以訪問知識網絡的機構內部的服務器訪問這段數據,而我實際上使用http://apps.webofknowledge.com/UA_GeneralSearch_input.do?product=UA&search_mode=GeneralSearch&[email protected]@5KH6&preferencesSaved=連接到知識網絡。

誰能告訴我發生了什麼?我需要網站的額外許可嗎?

我真的很感謝任何幫助!

回答