cancel
Showing results for 
Search instead for 
Did you mean: 

[resolved] switching from 2.2 to 3.2: Problems retr. Data

robobot
Champ in-the-making
Champ in-the-making
Hello,
we want to change to the latest alfresco community version 3.2. but there are problems retrieving data. Currently everything is working fine.
I have a sample Query that should retrieve Data with a specific content:

+PATH:"/app:company_home/app:user_homes/cm:Test/cm:Candidate/*"+@candidate\:Id: 100153413500000 Type: 8

Related code snippet:

..
try {
        queryResult = WebServiceFactory.getRepositoryService().query(STORE, query,false);
      } catch (RepositoryFault e) {        
          e.printStackTrace();
          return results;
      } catch (RemoteException e) {
         e.printStackTrace();
         return results;
      } 
     ResultSet resultSet = queryResult.getResultSet();
     ResultSetRow[] rows = resultSet.getRows();       
     
     if (rows == null){    
        return null;
     } 
      for(ResultSetRow row : rows) {
        for (NamedValue namedValue : row.getColumns()) {         
           String name = namedValue.getName();
           String value = namedValue.getValue();
           System.out.println(name + " - " + value);
        }
     }

And this is some example output

{http://www.alfresco.org/model/content/1.0}name - test.txt
{http://www.alfresco.org/model/system/1.0}node-dbid - 91763
{http://www.alfresco.org/model/content/1.0}modified - 2009-08-10T10:16:25.404+02:00
{http://www.alfresco.org/model/content/1.0}description - document test
{http://www.alfresco.org/model/system/1.0}node-uuid - 22f51af8-e0c1-431f-875b-55f1bb693b25
{candidate.model}Type - 9

Now, when I use alfresco 3.2., the same query just retrieves the following output.

{http://www.alfresco.org/model/content/1.0}path - /{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/applicatio...

What is the solution for this problem ?
May anybody help me or give me a hint ?

Best Regards
Steve
3 REPLIES 3

robobot
Champ in-the-making
Champ in-the-making
still don't know whats going on there. Smiley Indifferent  i have included the libs from the alfresco community edition 3.2. (found under project SDK AlfrescoRemote->Referenced Libraries) :

[img]http://www3.pic-upload.de/upload/10.08.09/q8yihvssiks7.png[/img]

igdolmo
Champ in-the-making
Champ in-the-making
with this you can get all those properties:

http://forums.alfresco.com/en/viewtopic.php?f=27&t=20366#p67412

robobot
Champ in-the-making
Champ in-the-making
thank you ! after an annoying day i found out, that this will give me the data also:


Node [] nodes = null;
try {
        nodes = WebServiceFactory.getRepositoryService().get(new Predicate(null,STORE,query));
      } catch (RepositoryFault e) {        
          e.printStackTrace();         
      } catch (RemoteException e) {
         e.printStackTrace();    
      }  
    
    if (null != nodes ) {
      for(Node row : nodes) {
        for (NamedValue namedValue : row.getProperties()) {         
          String name = namedValue.getName();
          String value = namedValue.getValue();      
          System.out.println(name + " - " + value);
       }
     }
    }