Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to create an empty Module artifact in RDNG using OSLC?

I am using RDNG 6.0.6 and OSLC creation factory same as this article -> https://jazz.net/library/article/1197
I searched the forum and found this issue https://jazz.net/forum/questions/205757/dng-60-create-module-through-oslc. It seem RDNG should be able to create Module in 6.0.6. 

I am not sure which is the correct rdf:type for creating module, so I try using "http://jazz.net/ns/rm#Module" as the value like this.

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:dc="http://purl.org/dc/terms/" 
xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/" 
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" 
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" 
xmlns:acp="http://jazz.net/ns/acp#" 
xmlns:rm_property="https://grarrc.ibm.com:9443/rm/types/" 
xmlns:oslc="http://open-services.net/ns/core#" 
xmlns:nav="http://jazz.net/ns/rm/navigation#" 
xmlns:oslc_rm="http://open-services.net/ns/rm#"
>
<rdf:Description rdf:about="">
<oslc:instanceShape rdf:resource="https://XXXX/rm/types/_XXXXXXXXXXXXXXXXXXXXXX"></oslc:instanceShape>
<nav:parent rdf:resource="https://XXXX/rm/folders/_XXXXXXXXXXXXXXXXXXXXXX"></nav:parent>
<dc:description rdf:parseType="Literal">OSLC Creation Example</dc:description>
    <dc:title rdf:parseType="Literal">OSLC Created Requirement</dc:title>        
<rdf:type rdf:resource="http://jazz.net/ns/rm#Module"></rdf:type>
<rdf:type rdf:resource="http://open-services.net/ns/rm#RequirementCollection"/>

</rdf:Description>
</rdf:RDF>

The server responses '201 created' and it end up creating an empty 'Collection' not an empty 'Module' artifact.


Then, I try this request body and still not successful. (RDNG will create a text artifact instead)

<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:dc="http://purl.org/dc/terms/" 
xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/" 
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" 
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" 
xmlns:acp="http://jazz.net/ns/acp#" 
xmlns:rm_property="https://grarrc.ibm.com:9443/rm/types/" 
xmlns:oslc="http://open-services.net/ns/core#" 
xmlns:nav="http://jazz.net/ns/rm/navigation#" 
xmlns:oslc_rm="http://open-services.net/ns/rm#"
>
<rdf:Description rdf:about="">
<oslc:instanceShape rdf:resource="https://XXXX/rm/types/_XXXXXXXXXXXXXXXXXXXXXX"></oslc:instanceShape>
<nav:parent rdf:resource="https://XXXX/rm/folders/_XXXXXXXXXXXXXXXXXXXXXX"></nav:parent>
<dc:description rdf:parseType="Literal">OSLC Creation Example</dc:description>
    <dc:title rdf:parseType="Literal">OSLC Created Requirement</dc:title>        
<rdf:type rdf:resource="http://jazz.net/ns/rm#Module"></rdf:type>
<rdf:type rdf:resource="http://open-services.net/ns/rm#Requirement"/>

</rdf:Description>
</rdf:RDF>

If I use only <rdf:type rdf:resource="http://jazz.net/ns/rm#Module"></rdf:type>, RDNG will return 403: Forbidden. CRRRS6401E Error parsing content. Content must be valid rdf+xml.


<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:dc="http://purl.org/dc/terms/" 
xmlns:public_rm_10="http://www.ibm.com/xmlns/rm/public/1.0/" 
xmlns:calm="http://jazz.net/xmlns/prod/jazz/calm/1.0/" 
xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" 
xmlns:acp="http://jazz.net/ns/acp#" 
xmlns:rm_property="https://grarrc.ibm.com:9443/rm/types/" 
xmlns:oslc="http://open-services.net/ns/core#" 
xmlns:nav="http://jazz.net/ns/rm/navigation#" 
xmlns:oslc_rm="http://open-services.net/ns/rm#"
>
<rdf:Description rdf:about="">
<oslc:instanceShape rdf:resource="https://XXXX/rm/types/_XXXXXXXXXXXXXXXXXXXXXX"></oslc:instanceShape>
<nav:parent rdf:resource="https://XXXX/rm/folders/_XXXXXXXXXXXXXXXXXXXXXX"></nav:parent>
<dc:description rdf:parseType="Literal">OSLC Creation Example</dc:description>
    <dc:title rdf:parseType="Literal">OSLC Created Requirement</dc:title>        
<rdf:type rdf:resource="http://jazz.net/ns/rm#Module"></rdf:type>
</rdf:Description>
</rdf:RDF>

I suspect that I am using incorrect rdf:type value.
If this is not the correct API for creating an empty Module artifact, please correct me.

0 votes



2 answers

Permanent link
Hi, 

I look forward to hearing from you.

If the rdf:type cannot be used, is it possible to change artifact format using API after creating artifact?

0 votes


Permanent link

Hi,


If you change the type to  <rdf:type rdf:resource="http://jazz.net/ns/rm#Artifact"/> it should work.
This way it works for us.

A RequirementCollection will always  be a Module.

0 votes

Your answer

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,937
× 516

Question asked: Jul 09 '20, 4:38 a.m.

Question was seen: 2,344 times

Last updated: May 16 '23, 9:33 a.m.

Confirmation Cancel Confirm