[OSLC-RM] Create Requirement in project-areas subfolder
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:
What am I missing here?
Btw: I installed the 4.0.4 RC1 version of JTS and Doors-NG.
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
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.
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.
One other answer
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.
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
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.