06-27-2009 02:12 PM
07-31-2009 09:40 AM
public static List<String> executeQuery (Query query)throws RepositoryFault, RemoteException{
SessionUtils.startSession();
try{
RepositoryServiceSoapBindingStub repositoryService = WebServiceFactory.getRepositoryService();
// Execute the query
QueryResult queryResult = repositoryService.query(SessionUtils.STORE, query, true);
// Display the results
ResultSet resultSet = queryResult.getResultSet();
ResultSetRow[] rows = resultSet.getRows();
if (rows != null)
{
List< String > results = new ArrayList< String >();
// Get the infomation from the result set
for(ResultSetRow row : rows)
{
String nodeId = row.getNode().getId();
results.add(nodeId);
}
return results;
}
}catch(RepositoryFault exc){
throw exc;
}finally{
SessionUtils.endSession();
}
return null;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.