Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Fetching Resultset for RM query using OSLC4J

I am using OSLC4J to fetch artifacts in DNG  with some query parameters.
String folderUri=https://server.com/folders/_45dhdjnakqqabncmkk7652js
OslcQueryParameters queryParams = new OslcQueryParameters(); 
       //  queryParams.setWhere("nav:parent=<"+ folderUri +">");
        //queryParams.setPrefix("oslc_rm=<http://open-services.net/ns/rm#>"); 
        queryParams.setPrefix("nav=<http://com.ibm.rdm/navigation#>,rdf=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>"); 
       queryParams.setWhere("nav:parent=<"+ folderUri +">, rdf:type=<http://open-services.net/ns/rm#Requirement>;");
        OslcQuery query = new OslcQuery(client,queryCapability, 50, queryParams);
        System.out.println(query.getPageSize());
        OslcQueryResult result = query.submit();
        String[] s=result.getMembersUrls()

The result doesnt show any records. I checked using oslc2.0 and the same query url shows 41 results.
Am I missing something.
I am following article: https://jazz.net/library/article/1382


 

0 votes

Comments

Have you checked the log file (rm.log) for any errors?

There are no errors in the log file.
When I am trying to parse the response using xml, the response is fine.
Ex: ClientResponse res=result.getRawResponse();
            if(res.getStatusCode()==200){
                return res.getEntity(InputStream.class);}
But When I try to get the result using:
result
.getMembersUrls(), its null.
and getMembersUrls().length is zero.

You'd better dump the response and see what you've got with HTTP 200 code.


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Sep 28 '16, 9:42 a.m.

Question was seen: 1,931 times

Last updated: Sep 30 '16, 1:32 a.m.

Confirmation Cancel Confirm