2014-02-27 39 views
1

我有以下代碼PHP連接到SharePoint使用Thybag SharePointAPI

//$sp = new SharePointAPI('&&', '&&', 'https://&&.net/personal/zzz/_vti_bin/Lists.asmx?WSDL',); 

//$sp = new SharePointAPI('&&', '&&', 'https://&&net/personal/zzz/_vti_bin/Lists.asmx?SDL', 'NTLM'); 

$sp = new SharePointAPI('&&', '&&', 'https://&&net/personal/zzz/_vti_bin/Lists.asmx?WSDL', 'SPONLINE'); 

$listContents = $sp->read('GetListCollection'); 

return $listContents; 

根據其「新SharepointAPI」我行執行的,我得到一個不同的錯誤。

使用 「NTLM」,我得到的錯誤: -

Uncaught exception 'Exception' with message 'Error' 
in /home/shinksyc/public_html/sharepointUpload/src/Thybag/Auth/SoapClientAuth.php:129 
Stack trace: 
#0 [internal function]: Thybag\Auth\SoapClientAuth->__doRequest('<?xml 
version="...', 'https://my.sp.m...', 'http://schemas....', 1, 0) 

使用 「SPONLINE」,我得到的錯誤

'Error (Client) looks like we got no XML document'. 

我也爲略顯混亂如何找出什麼列表的名字可能是我讀的。

任何幫助,非常感謝。

感謝

馬丁

+0

只是爲了澄清,你的代碼樣本中的「&」「&&」已被替換爲用戶名和密碼對不對? – phil

+0

它具有...相同的URL。 –

+0

您試圖連接到什麼類型的SharePoint(在線SharePoint vs自我託管)?加上任何想法是什麼版本。對於大多數情況下的自我託管,您只需使用基本身份驗證方法(頂部),而對於SharePoint在線,則需要SPOnline。 – Carl

回答