AnsweredAssumed Answered

XPATH query, results didnt match

Question asked by miguelsuarez on Oct 28, 2010
Hi, im launching XPATH query thought web service. I created a reference to a node (folder), i created a predicate including an xpath query in his params, but the result is always the node I make the reference (folder) instead of the nodes I query in the predicate. This is my code:


getRootPath()+path = /app:company_home/cm:appfolder/cm:appsubfolder
query = new Query("xpath", *[@cm:name='CONC.txt']);

         RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
         
         // Si no hay criterios de busqueda, se recuperan todos los hijos del nodo indicado en el path
         Reference reference = new Reference(Constants.STORE, null, getRootPath()+path);               
         //Predicate predicate = new Predicate(new Reference[]{reference}, Constants.STORE, query);
         Predicate predicate = new Predicate(new Reference[]{reference}, Constants.STORE, query);    
         Node[] nodes = repositoryService.get(predicate);

If a launch the same query in node browser, the node results are ok. What can be wrong?

Thanks in advance.

Outcomes