全部 我是一個phper和新的共享點。 我現在正在開發一個網站使用PHP和文件存儲服務與Sharepoint服務2.0 通過啓用IIS中的匿名身份驗證,可以訪問Web服務本身沒有問題。 這是我的問題。在調試我的代碼時,我不斷收到「未經授權」錯誤。 異常消息看起來像Sharepoint服務Web服務問題:未授權
SoapFault Object ( [message:protected] => Unauthorized [string:Exception:private] => [code:protected] => 0 [file:protected] => /var/www/snippet/wsdl/index.php [line:protected] => 12 [trace:Exception:private] => Array ( [0] => Array ( [function] => __doRequest [class] => SoapClient [type] => -> [args] => Array ( [0] => Issue [1] => http://192.168.56.101/sites/SPS2003/_vti_bin/Lists.asmx [2] => http://schemas.microsoft.com/sharepoint/soap/GetList [3] => 1 [4] => 0 ) ) [1] => Array ( [file] => /var/www/snippet/wsdl/index.php [line] => 12 [function] => __call [class] => SoapClient [type] => -> [args] => Array ( [0] => GetList [1] => Array ( [0] => Array ( [listName] => Issue ) ) ) ) [2] => Array ( [file] => /var/www/snippet/wsdl/index.php [line] => 12 [function] => GetList [class] => SoapClient [type] => -> [args] => Array ( [0] => Array ( [listName] => Issue ) ) ) ) [previous:Exception:private] => [faultstring] => Unauthorized [faultcode] => HTTP [xdebug_message] => SoapFault: Unauthorized in /var/www/snippet/wsdl/index.php on line 12 Call Stack: 0.0004 637376 1. {main}() /var/www/snippet/wsdl/index.php:0 0.0006 758992 2. SoapClient->GetList(array(1)) /var/www/snippet/wsdl/index.php:12 )
和我的代碼片段的類似
$client = new SoapClient("http://192.168.56.101/sites/SPS2003/_vti_bin/Lists.asmx?wsdl"); try{ $result = $client->GetList(array("listName" => "Issue")); } catch(Exception $e){ print_r($e); }
這可能是IIS配置的錯嗎? 我使用的是sharepoint服務2.0和sharepoint門戶服務器2003. 那麼,有人能幫我嗎?
在此先感謝。
是的。我嘗試了新的SoapClient的auth_parameters並得到「http 401未授權」錯誤。然後我更改了啓用匿名身份驗證的IIS設置。結果如上。也許我應該再試一次。還是謝謝。 – AleiPhoenix 2011-03-03 03:53:59