Hi allI´m making a componet for joomla (php) who conect to Alfresco using CMIS.The cmis libraries that I use are:https://svn.apache.org/repos/asf/chemistry/phpclient/trunk/atom/cmis/cmis_service.phphttps://svn.apache.org/repos/asf/chemistry/phpclient/trunk/atom/cmis/cmis_repository_wrapper.phpI have a problem with the conexion and the query. I use this piece of code in joomla php page:
require_once ('cmis/cmis_repository_wrapper.php');
require_once('cmis/cmis_service.php');
$repo_url = 'http://localhost/alfresco/service/api/cmis';
$repo_username = 'admin';
$repo_password = 'admin';
$client = new CMISService($repo_url, $repo_username, $repo_password);
if ($repo_debug)
{
print "Repository Information:\n</br>===========================================</br>\n";
print_r($client->workspace);
print "\n</br>===========================================</br></br>\n\n";
}
$objs = $client->query("select * from cmis:folder");
if ($repo_debug)
{
print "Returned Objects\n:\n</br>===========================================</br>\n";
print_r($objs);
print "\n</br>===========================================</br></br>\n\n";
}
This is the error page:
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Notice: Trying to get property of non-object in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 726
Repository Information:
===========================================
stdClass Object ( [links] => Array ( ) [uritemplates] => Array ( ) [collections] => Array ( [] => http://localhost:80/alfresco/service/api/query ) [capabilities] => Array ( [cmis:capabilityMultifiling] => true [cmis:capabilityUnfiling] => false [cmis:capabilityVersionSpecificFiling] => false [cmis:capabilityPWCUpdateable] => true [cmis:capabilityPWCSearchable] => true [cmis:capabilityAllVersionsSearchable] => false [cmis:capabilityQuery] => both [cmis:capabilityJoin] => nojoin [cmis:capabilityFullText] => fulltextandstructured ) [repositoryInfo] => Array ( ) [permissions] => Array ( ) [permissionsMapping] => Array ( ) )
===========================================
Notice: Undefined index: query in C:\xampp\htdocs\cmis\cmis_service.php on line 579
Fatal error: Uncaught exception 'CmisRuntimeException' in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php:176 Stack trace: #0 C:\xampp\htdocs\cmis\cmis_repository_wrapper.php(233): CMISRepositoryWrapper->convertStatusCode(0, false) #1 C:\xampp\htdocs\cmis\cmis_service.php(579): CMISRepositoryWrapper->doPost(NULL, '<?xml version="…', 'application/cmi…') #2 C:\xampp\htdocs\cmis_test.php(38): CMISService->query('select * from c…') #3 {main} thrown in C:\xampp\htdocs\cmis\cmis_repository_wrapper.php on line 176
It think that the version of my Cmis Alfresco Labs3.0 is 0.5 and the libs that I use are for Cmis v1.0.Anyone know why I have this error??Are there any problem with this diferent versions??Someone have any example and/or Api for Afresco Labs 3.0 CMIS that I can use??Thanks in advance.