To all concerned,
We've been having an issue in the query translation of a CMIS query that includes the cmis:path attribute.
Code Sample
|
---|
//--------------------------------------------------------- // Initialize Variables Session session = CmisUtils.getSession( restUrl, repository, BindingType.ATOMPUB, username, password ); DiscoveryService dServ = session.getBinding().getDiscoveryService();
//--------------------------------------------------------- // Retrieve Query StringBuilder sbQuery = new StringBuilder("SELECT " ) .append( PropertyIds.NAME ).append( ", " ). .append( PropertyIds.PATH ).append( ", " ). .append( PropertyIds.OBJECT_ID ) .append( " FROM custom_doc WHERE org_id = '95' ") .append("and customer_id = 'Investor_Demo' ");
//--------------------------------------------------------- // Retrieve Query ObjectList objList = dServ.query(repository, sbQuery.toString(), true, false, IncludeRelationships.NONE, null, null, null, null); assertNotNull(objList); |
The result of the query is
org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Bad Request
Looking at the logs, a more detailed description is:
Server Error message
|
---|
15:08:13,322 ERROR [tomcat-http--1142] com.emc.documentum.fs.cmis.rs.impl.provider.exception.CmisExceptionMapper - org.cmis.ws.CmisException: Failed to execute query: SELECT object_name,r_folder_path,r_object_id FROM custom_doc (ALL) WHERE org_id = '95' AND customer_id = 'Investor_Demo' [E_QUERY_ACTION_FAILED] "QUERY" action failed. You have specified an invalid attribute name (r_folder_path). [DM_QUERY_E_NOT_ATTRIBUTE] You have specified an invalid attribute name (r_folder_path). at com.emc.documentum.fs.cmis.impl.dfs.utils.CmisExceptionFactory.create(CmisExceptionFactory.java:25) at com.emc.documentum.fs.cmis.impl.dfs.utils.CmisExceptionBuilder.build(CmisExceptionBuilder.java:31) |
In order to use r_folder_path, the query needs to link to the dm_folder specifically. This leads me to believe that the translation to support cmis:path attribute is not interoperable as one needs to know to join to the dm_folder object. If there are any thoughts to using the cmis:path attribute, it would be much appreciated.