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 |
Be the first one to answer this question!
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.
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.