cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a working query in Visual Studio

tazok
Champ in-the-making
Champ in-the-making
Hi

i'm trying to make a query.

i used this code


            makeRepositoryStore("SpacesStore");//creazione dello store
            setRepositoryRef(spacesStoreRep, null, x.id);
//this is the store creation, user already authenticated via authentication tools
            Alfresco.RepositoryWebService.Query query = new Alfresco.RepositoryWebService.Query();

            query.language= Alfresco.RepositoryWebService.QueryLanguageEnum.xpath;
            query.statement="*";
            int batchsize = 10;
            QueryConfiguration querycfg = new QueryConfiguration();
            querycfg.fetchSize = batchsize;
            querycfg.Relay = true;
         
            QueryResult testquery= new QueryResult();
             testquery = repoService.query(spacesStoreRep, query, true);
           
having this
private RepositoryService repoService
and
 
private void setRepositoryRef(Alfresco.RepositoryWebService.Store spstore, String percorso, String id)
        {

            referenzaRep = new Alfresco.RepositoryWebService.Reference();
            if (spstore != null)
            {
                referenzaRep.store = spstore;
                if (percorso != null) referenzaRep.path = percorso; //"/app:company_home"
                if (id != null) referenzaRep.uuid = id;
            }
         }


the query code give me ever a soapexception. All other is fine and working!
I don't know:
1) how to use queryconfiguration(it's correct to create a new queryconfiguration, but where to use it??)
2) why it ever bother me with soapexceptions.

i cannot use soapBindingStubs because in web services they are not present.
Thanks for any hint

tz
1 REPLY 1

tazok
Champ in-the-making
Champ in-the-making
update

with a lucene query it works.
:shock: