It's all about the answers!

Ask a question

Not able to create Artifact using OSLC capabilities - (Error: CRRRS6401E)


Philipp Thomann (306) | asked Feb 08 '21, 10:02 a.m.
edited Feb 08 '21, 12:25 p.m.
Good day, I am trying to create a new artifact in (Engineering Requerements Management DOORS Next)
I am following the article stated in the source bellow:


Used Programming language: C# VS
Api: OSLC-Core-Version=2.0

URL I call: https://xxxx.xxx.com/rm/requirementFactory?projectURL=https://xxxx.xxxx.com/jts/process/project-areas/_zpWqELrZEeG3OKR6fZ1svQ

(zpWqELrZEeG3IKR6fZ1svQ is referring to the project in which i want to create the artifact, this should be correct right?)

Request:
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(repository + service);           request.AllowAutoRedirect = true;
request.KeepAlive = true;
request.Timeout = 480000;
request.Credentials = context.Credential;
request.Headers.Add("OSLC-Core-Version: 2.0");
request.ContentType = "application/rdf+xml";
request.Accept = "application/rdf+xml";
request.Headers.Add(context.AuthHeader);
request.CookieContainer = context.Cookie;
request.Method = "POST";

Content I send:
string envelope =
"<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://xxx.xxxx.com/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=\"\">" +
"<rdf:type rdf:resource=\"http://open-services.net/ns/rm#Requirement\"/>" +
"<dc:description rdf:parseType=\"Literal\">OSLC Creation Example</dc:description>" +
"<dc:title rdf:parseType=\"Literal\">OSLC Created Requirement</dc:title>" +

"<oslc:instanceShape rdf:resource=\"https://xxx.xxxx.com/rm/types/OT_MxDOgAFrEeulF-qoQS8K8w\"/>" +          
"<nav:parent rdf:resource=\"https://xxx.xxxx.com/rm/folders/FR_cROX1AFrEeulF-qoQS8K8w\"/> " +
"</rdf:Description>" +
"</rdf:RDF>";

Error:
403 Forbidden
Fiddler shows me following error term in the response:
CRRRS6401E Error parsing the content. The content must be in a vaild RDF + XML format.

Further remarks:
"<oslc:instanceShape rdf:resource=\"https://xxx.xxxx.com/rm/types/OT_MxDOgAFrEeulF-qoQS8K8w\"/>" 

I got this information (used in POST) from the respones of: https://xxx.xxxx.com/rm/oslc_rm/_VmiN4PQ4Eequ_bWtpv6_DQ/services.xml

Part of the response:
<oslc:CreationFactory>
<oslc_config:component rdf:resource="https://xxx.xxx.com/rm/cm/component/_V1TCoPQ4Eequ_bWtpv6_DQ"/>
<oslc:resourceType rdf:resource="http://open-services.net/ns/rm#Requirement"/>
<oslc:creation rdf:resource="https://xxx.xxx.com/rm/requirementFactory?projectURL=https%3A%2F%xxx.xxx.com%2Frm%2Fprocess%2Fproject-areas%2F_VmiN4PQ4Eequ_bWtpv6_DQ"/>
<oslc:usage rdf:resource="http://open-services.net/ns/core#default"/>
<oslc:resourceShape rdf:resource="https://xxx.xxx.com/rm/types/OT_fGL3kCgfEeumi_444FHgDA"/>
<oslc:resourceShape rdf:resource="https://xxx.xxx.com/rm/types/OT_fE_kwCgfEeumi_444FHgDA"/>
 <dcterms:title rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Anforderungserstellungs-Factory</dcterms:title>
<oslc:resourceShape rdf:resource="https://xxx.xxxx.com/rm/types/OT_MxDOgAFrEeulF-qoQS8K8w"/>
<oslc:resourceShape rdf:resource="https://xxx.xxx.com/rm/types/OT_fEP94ygfEeumi_444FHgDA"/>
<oslc:resourceShape rdf:resource="https://xxx.xxxx.com/rm/types/OT_WZQxQGnqEeuJX5tbXXkp4A"/>
</oslc:CreationFactory>
</oslc:creationFactory>
<oslc:creationFactory>

Any input is very much appreciated and if any more information is needed, I am happy to provide it. 
Thank you very much!
//Philipp

Accepted answer


permanent link
Ralph Schoon (63.5k33646) | answered Feb 09 '21, 3:53 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Not sure, not my domain. Make sure you sent UTF-8 encoded data. Maybe use a string builder and not '+' when building the string. 

Ralph Schoon selected this answer as the correct answer

Comments
Philipp Thomann commented Feb 10 '21, 7:33 a.m. | edited Feb 10 '21, 8:50 a.m.

The string builder did the trick, thank you for the hint Ralph!!


Ralph Schoon commented Feb 10 '21, 8:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Wow, that was unexpected, glad it works for you now. 

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.