Fetching Resultset for RM query using OSLC4J
I am using OSLC4J to fetch artifacts in DNG with some query parameters.
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
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
Comments
Donald Nong
Sep 29 '16, 10:06 p.m.Have you checked the log file (rm.log) for any errors?
Sudipto Sarkar
Sep 30 '16, 1:28 a.m.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.
Donald Nong
Sep 30 '16, 1:32 a.m.You'd better dump the response and see what you've got with HTTP 200 code.