次のようにphpで記述されたWebサービスを介して、共有ポイント2007のリストからデータを取得しようとしています:
<?php
//Authentication details
$authParams = array('login' => 'username', 'password' => 'password' , "authentication" => SOAP_AUTHENTICATION_DIGEST);
/* A string that contains either the display name or the GUID for the list.
* It is recommended that you use the GUID, which must be surrounded by curly
* braces ({}).
*/
$listName = "Testlist";
$rowLimit = '150';
/* Local path to the Lists.asmx WSDL file (localhost). You must first download
* it manually from your SharePoint site (which should be available at
* yoursharepointsite.com/subsite/_vti_bin/Lists.asmx?WSDL)
*/
$wsdl = "http://localhost/phpsp/Lists.wsdl";
//Creating the SOAP client and initializing the GetListItems method parameters
$soapClient = new SoapClient($wsdl, $authParams);
$params = array('listName' => $listName, 'rowLimit' => $rowLimit);
//Calling the GetListItems Web Service
$rawXMLresponse = null;
try{
$rawXMLresponse = $soapClient->GetListItems($params)->GetListItemsResult->any;
}
catch(SoapFault $fault){
echo 'Fault code: '.$fault->faultcode;
echo 'Fault string: '.$fault->faultstring;
}
echo '<pre>' . $rawXMLresponse . '</pre>';
..
..
?>
共有ポイントと URL で作成されたリストがあり、リストには「.asmx」拡張子が表示されます。このサンプル コードで行ったように、リストを手動でダウンロードして「.wsdl」として使用するにはどうすればよいですか。
ネットで同じものを検索したところ、次の場所で入手できると言われています。
sharepoint.url/subsite/_vti_bin/Lists.asmx?WSDL
しかし、.wsdl ファイルを取得できませんでした。