Creating OSLC Links across multiple components in the same global configuration
![]() Hello,
In my current setup I have several components that belong to the same global configuration.
I'm currently using DNG 7.0.
I want to create a link from an artifact (inside a module) to another artifact inside a different module living in a different component.
I'm always getting a server error [403]: CRRRS4510W The link was not created because it does not meet defined link constraints.
However, I can create the link manually without any issue, and if I perform the exact same request (with the manually added link already present), the request is successful (it adds same component links, for instance).
I even tried to perform a GET, remove the read-only attributes and perform a PUT request with the same data coming from the GET without any luck.
In short, adding the link manually and then performing the PUT request, it works and the item gets updated. If I remove the link and perform the PUT request I get the 403 error mentioned above.
as headers, I'm using:
vvc.configuration = componentStream
oslc_config.context = global configuration URI (I also tried without this)
Content-Type = application/rdf+xml
OSLC-Core-Version = 2.0
If-Match = etag (from a previous get)
(also tried with a private header)
I hope the question is clear enough.
Best Regards,
Diogo
EDIT: I tried using the method described here:
Creating links between requirements across multiple components using OSLC |
One answer
![]() Hello Ian, thanks for your support.
The components have been created using the same template.
Regarding the first points, I tried also several combinations of oslc_config.context and vvc.configuration. As I said before, if I add the link manually via UI following the link constraints (even a system defined link type), it works fine.
What I've tried.
1. Create manually via UI a system defined link compliant with the link constraints.
2. Perform a GET and retrieve the application/rdf+xml representation
3. Remove the link via UI
4. Adapt the application/rdf+xml to comply with OSLC specification (removing for instance read only fields)
5. Perform a PUT operation (with the link there)
6. RESULT: Error 403.
If I repeat the steps 1-6 without removing the link via UI, meaning not executing step 3, it works fine. the link is kept. If I remove the link from the OSLC representation sent in step 5, then, the link is deleted (as expected).
On another note, I'm able to create the links now using a workaround (the same as the browser does.) it just takes 3 minutes per link.
What I'm doing now is the following:
POST to: <RM_SERVER_ADDRESS>/rm/links
headers:
{'DoorsRP-Request-Type': 'private',
'Content-Type': 'application/rdf+xml',
'oslc.configuration': '<GC_SERVER_ADDRESS>/gc/configuration/145', 'net.jazz.jfs.owning-context': '<RM_SERVER_ADDRESS>/rm/rm-projects/_IrrUYfOtEealZ_zm_SstCA/components/_na2ccCWuEeu1LM6pSS3uxg', 'Referer': '<RM_SERVER_ADDRESS>/rm/web',
'X-Requested-With': 'XMLHttpRequest'}
<rdf:RDF xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rm:Link rdf:about="">
<rdf:subject rdf:resource="<RM_SERVER_ADDRESS>/rm/resources/BI_Jcr7ADaCEeuKQpyRg7GYdQ"/>
<rdf:object rdf:resource="<RM_SERVER_ADDRESS>/rm/resources/BI_lFAdMDypEeuKQpyRg7GYdQ"/>
<rdf:predicate rdf:resource="http://purl.org/dc/terms/references"/>
<rm:suspectSubjectCleared/>
<rm:suspectObjectCleared/>
<rdf:type rdf:resource="http://www.ibm.com/xmlns/rdm/rdf/Link"/>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"/>
<rm:hasAttrVal rdf:parseType="Resource">
<rm:hasAttrDef rdf:resource="http://purl.org/dc/terms/title"/>
<rdf:value>483159</rdf:value>
</rm:hasAttrVal>
</rm:Link>
</rdf:RDF>
|
Comments
I've never tried this:
Which link type are you creating? iirc you can only create OSLC links using the OSLC API. the UI allows you to create any link type, of course.
Please see my answer bellow. The character limit on this box was too small to answer properly.