Problem with OSLC in Doors to get Requirements from a Folder.
I'm trying to create a consumer application for Doors Next Generation.
I want to create a tree view so that the user can click on a folders to see the requirements inside.
I'm trying to create the OLSC query URL which can get the requirements in a folder the but with no luck.
I have read the article: https://jazz.net/library/article/1197
but I'm missing something since every time I run the query, I get the error message is:
Error when converting: oslc.query=true& oslc.prefix=oslc& oslc.select=dcterms:title& oslc.select=dcterms:description& oslc.select=oslc:instanceShape& oslc.where=nav:parent com.ibm.oslc.query.parser.select.ParseException: Invalid prefix definition: oslc
My query base is
https://airbus.agi.com:9443/rm/views?oslc.query=true&projectURL=https://airbus.agi.com:9443/rm/process/project-areas/_krlZkgR6EeW1urK_Hs682g
My folder url is
https://airbus.agi.com:9443/rm/folders/_rYA7EiVYEeWzIKG-AepNow
As I understand, all I need to do is to add the following to the query base:
&oslc.prefix=oslc=<http://open-services.net/ns/core%23>,dcterms=<http://purl.org/dc/terms/>,nav=<http://com.ibm.rdm/navigation%23>&oslc.select=dcterms:title,dcterms:description,oslc:instanceShape&oslc.where=nav:parent=<https://airbus.agi.com:9443/rm/folders/_rYA7EiVYEeWzIKG-AepNow>
However,When I do an HTTP get on the following, I get the error message shown above. Could someone shed light on what is wrong with my statement?
This is what I'm posting
https://airbus.agi.com:9443/rm/views?oslc.query=true&projectURL=https://airbus.agi.com:9443/rm/process/project-areas/_krlZkgR6EeW1urK_Hs682g&oslc.prefix=oslc=<http://open-services.net/ns/core%23>,dcterms=<http://purl.org/dc/terms/>,nav=<http://com.ibm.rdm/navigation%23>&oslc.select=dcterms:title,dcterms:description,oslc:instanceShape&oslc.where=nav:parent=<https://airbus.agi.com:9443/rm/folders/_rYA7EiVYEeWzIKG-AepNow>
Thanks in advance.
Ian
One answer
Another tip is to check the rm.log file as it will show what the parameters are when the error occurs and you can adjust accordingly.
Comments
I am using 6.0.1 RM server and I tried to replicate same query, but I am getting following exception:
oslc.where=nav:parent=<https://example.com:9443/rm/folders/_pCsHIeuBEeW8KYg-oqs26A>&
oslc.select=*
java.lang.RuntimeException: Undefined namespace prefix: nav (More info found at entry [146e8a858b4f5d5a] in the RM application server log)</err:detailedMessage>
<err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Bad Request</err:errorMessage>
<err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
>400</err:errorStatus>
Am i missing something.
Yes, you missed the "nav" namespace specification. It's the last of the three namespaces defined in "oslc.prefix" in my example above.