It's all about the answers!

Ask a question

Problem with OSLC in Doors to get Requirements from a Folder.


Ian Giblett (2621416) | asked Jul 21 '15, 4:03 a.m.
edited Jul 21 '15, 5:01 a.m. by Ralph Schoon (63.4k33646)
Hello,

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



permanent link
Donald Nong (14.5k614) | answered Jul 21 '15, 6:39 a.m.
Yes it _should_ work. Constructing the URL is quite tricky and I suggest you escape the characters whenever possible to maintain the clear ?param=value&param=value format. Below is the URL that work in my CLM 5.0.2 environment.

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
Sudipto Sarkar commented Aug 25 '16, 3:21 a.m.

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=&lt;https://example.com:9443/rm/folders/_pCsHIeuBEeW8KYg-oqs26A&gt;&amp;
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.


Donald Nong commented Aug 25 '16, 5:10 a.m.

Yes, you missed the "nav" namespace specification. It's the last of the three namespaces defined in "oslc.prefix" in my example above.

Your answer


Register or 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.