It's all about the answers!

Ask a question

[OSLC-RM] Create Requirement in project-areas subfolder


Benjamin Röhl (1671425) | asked Aug 09 '13, 8:46 a.m.
Hey,
I'm trying to create a requirement in a subfolder with REST API. I've followed the instruction of that article.
When i create the resource without navigation property for parent folder, the resource is created in the root folder of the project-area.
By adding the navigation property:
<nav:parent rdf:resource="https://[host]:9443/rm/folders/[folder_id]"/>
with namespace defined at the resource beginning:
xmlns:nav="http://jazz.net/ns/rm/navigation#"
, results in a 500 Internal Server Error.

What am I missing here?

Btw: I installed the 4.0.4 RC1 version of JTS and Doors-NG.

Accepted answer


permanent link
Rosa Naranjo (2.9k11723) | answered Aug 27 '13, 12:35 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hello
I am not sure what you are missing or if there is a problem with the 4.0.4 RC1 driver you have.  I cover creating a requirement in a folder in a section called 'Create requirement in folder' of this blog post:  http://rhnaranjo.wordpress.com/2012/06/25/folder-support-added-to-rrc-4-0-oslc-rm-api-implementation/

Make sure you have the proper headers for your POST request and that the rest of the body for the requirement is correct.
Benjamin Röhl selected this answer as the correct answer

One other answer



permanent link
Benjamin Röhl (1671425) | answered Aug 28 '13, 6:13 a.m.
Thanks for your post. I started another try to fix it and I could.
In the code I set the property of the parent folder as a String and not as a URI, which resulted in a wrong serialization of the request body.



Comments
Naveen Tyagi commented Oct 01 '15, 2:53 a.m.

Hi Benjamin,
I need same in my project. i am able to create requirement using OSLC. but i want to create inside a folder if i have folderURI.
as you mentioned in your comment, i didn't  find Parent Folder property in the requirement object (i am going to create) . Apart from All there is one property requirement.setServiceProvider(URI). i tried to pass folder but that didn't work. could you please tell how can i make this happen. Thanking in advance.

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.