views:

71

answers:

0

Hi there

we're working on simple integration of PHP basad application with Sharepoint Document Management system.

The idea is to be able to:

I. create a subfolder in Sharepoint DWS from PHP - we have this point working. II. list documents of a particular subfolder of DWS (and have a direct links to these doc on sharepoint)

We have developed a version I. of PHP code using native PHP soapclient where we successfully connect to Sharepoint DWS and invoking these methods:

  • GetDwsData
  • GetDwsMetaData
  • CreateFolder

We don't know how to achieve function II. (generate list of documents from particular sharepoint DWS subfolder) using Dws Class Web services.

As a reference we're using MSDN Library: http://msdn.microsoft.com/en-us/library/ms774590(v=office.12).aspx

So our question is: how to generate list of DWS documents which exists in particular Sharepoint's DWS subfolder using Sharepoint web services?

Attached is our sample of code where we successfully connect to Sharepoint Web Services and using Dws class method.

Thanks

Code sample:

php
//Authentication details
$authParams = array('login' => 'user@domain',
     'password' => 'secret');

$guid = "{1B8148DE-49FA-4A42-B62F-70E0DEBB2A20}";     

/* 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://sharepoint.domain/_vti_bin/Dws.asmx?WSDL";

//Creating the SOAP client and initializing the GetListItems method parameters
$soapClient = new SoapClient($wsdl, $authParams);

// GetDwsData - params
$params = array('document' => $guid);

//Calling the GetDwsData Web Service
$rawXMLresponse = null;
try{
 $rawXMLresponse = $soapClient->GetDwsData($params);
}
catch(SoapFault $fault){
 echo 'Fault code: '.$fault->faultcode;
 echo 'Fault string: '.$fault->faultstring;
}

header ("content-type: text/xml");
echo $rawXMLresponse->GetDwsDataResult;

return;
?>