how will you query using CMIS CQL(SQL) from java client?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 02:17 AM
I want to query alfresco repository using CMIS SQL(CQL).can we query from normal java client with CURD operations?how?can you give me sample?i tried to JavaCmisTest client but it is giving exception—>Could not find definition for service {http://www.cmis.org/ns/1.0}NavigationService.
Thanks in advance
Thanks in advance
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2008 05:33 AM
Hi All now I am able to run javaCMISTest and getting folders and documents in Company Home but not querying to repo

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2008 12:46 AM
hi all …finally i got a solution..
thank you
thank you
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2009 05:52 AM
Hi,
I have the same problem of you. I do not know how to query using CMIS SQL from Java client. How did you do it finally? Can you help me?
Thanks in advance.
I have the same problem of you. I do not know how to query using CMIS SQL from Java client. How did you do it finally? Can you help me?
Thanks in advance.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2009 07:21 AM
Hi,
I am trying to set up a sample CM IS java application to perform the CRUD operations. Could you please let me know where i can find the JavaCmisTest client? Or can somebody provide a sample application for my reference.
Please help me.. It is urgent.
Thanks in advance
I am trying to set up a sample CM IS java application to perform the CRUD operations. Could you please let me know where i can find the JavaCmisTest client? Or can somebody provide a sample application for my reference.
Please help me.. It is urgent.
Thanks in advance

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2009 01:29 AM
WebApplicationContext wc1 = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
ServiceRegistry serviceRegistry = getServiceRegistry(getServletContext());
transactionService = (TransactionService) wc1.getBean("transactionComponent");
authenticationComponent = (AuthenticationComponent) wc1.getBean("authenticationComponent");
AuthenticationService ass = serviceRegistry.getAuthenticationService();
ass.authenticate("admin", "admin".toCharArray());
authenticationDAO = (MutableAuthenticationDao) wc1.getBean("authenticationDao");
testTX = transactionService.getUserTransaction();
testTX.begin();
System.out.println("###################################");
this.authenticationComponent.setSystemUserAsCurrentUser();
NodeService ns = serviceRegistry.getNodeService();
SearchService serses = serviceRegistry.getSearchService();
System.out.println("ON CSTORERQ: 2 destination eswar ");
NodeRef rootNode = Repository.getCompanyRoot(ns, serses, serviceRegistry.getNamespaceService(), Repository.getStoreRef(), "app:company_home");
if (authenticationDAO.userExists("admin")) {
ass.deleteAuthentication("admin");
}
ass.createAuthentication("admin", "admin".toCharArray());
cmisService = (CMISService) wc1.getBean("CMISService");
System.out.println("***** cmisService.getDefaultRootNodeRef() **** " + cmisService.getDefaultRootNodeRef());
NodeRef rootNode123 = cmisService.getDefaultRootNodeRef();
cmisPropertyService = (CMISPropertyService) wc1.getBean("CMISPropertyService");
cmisQueryService = (CMISQueryService) wc1.getBean("CMISQueryService");
String qr = getQuery();
}
CMISResultSet rs = cmisQueryService.query(getQuery());
System.out.println("ON CSTORERQ:5 rs.getLength :" + rs.getLength());
CMISResultSetMetaData md = rs.getMetaData();
ServiceRegistry serviceRegistry = getServiceRegistry(getServletContext());
transactionService = (TransactionService) wc1.getBean("transactionComponent");
authenticationComponent = (AuthenticationComponent) wc1.getBean("authenticationComponent");
AuthenticationService ass = serviceRegistry.getAuthenticationService();
ass.authenticate("admin", "admin".toCharArray());
authenticationDAO = (MutableAuthenticationDao) wc1.getBean("authenticationDao");
testTX = transactionService.getUserTransaction();
testTX.begin();
System.out.println("###################################");
this.authenticationComponent.setSystemUserAsCurrentUser();
NodeService ns = serviceRegistry.getNodeService();
SearchService serses = serviceRegistry.getSearchService();
System.out.println("ON CSTORERQ: 2 destination eswar ");
NodeRef rootNode = Repository.getCompanyRoot(ns, serses, serviceRegistry.getNamespaceService(), Repository.getStoreRef(), "app:company_home");
if (authenticationDAO.userExists("admin")) {
ass.deleteAuthentication("admin");
}
ass.createAuthentication("admin", "admin".toCharArray());
cmisService = (CMISService) wc1.getBean("CMISService");
System.out.println("***** cmisService.getDefaultRootNodeRef() **** " + cmisService.getDefaultRootNodeRef());
NodeRef rootNode123 = cmisService.getDefaultRootNodeRef();
cmisPropertyService = (CMISPropertyService) wc1.getBean("CMISPropertyService");
cmisQueryService = (CMISQueryService) wc1.getBean("CMISQueryService");
String qr = getQuery();
}
CMISResultSet rs = cmisQueryService.query(getQuery());
System.out.println("ON CSTORERQ:5 rs.getLength :" + rs.getLength());
CMISResultSetMetaData md = rs.getMetaData();

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2009 01:33 AM
In the above logic getquery method will take any sql like query from user and then by using CMISquery service will provide u the service for your query..
if you have more requirements on CMIS SQL please let me know if possible
thanks in advance
if you have more requirements on CMIS SQL please let me know if possible
thanks in advance
