It's all about the answers!

Ask a question

How to Update RQM Test Plan Sections contents via OSLC

Victor Polo de Gyves Montero (135) | asked Feb 21 '19, 3:51 p.m.


Which are the missing steps or instructions to update a Test Plan Section, created by a Test Artifact Template for a Configurations-Enabled RQM project at CLM 6.0.6?

Given the following test plan in RQM, we have created it using a custom test artifact template which adds two sections: “Business Objectives” and “DemoCustomSection”.

Business Objectives” section should contain free-form rich text data. “DemoCustomSection” section should contain a grid with two columns of data.

So, I created the next code to get the XML of the test plan and its ETag:

// Get RDF/XML of test plan

RqmApiClient customClient = new RqmApiClient(jtsUri, username, password);


HttpClient httpClient = customClient.getHttpClient();

String uri = ""+





 "?oslc_config.context="+conf3 +


HttpGet httpGet = new HttpGet( uri );

httpGet.addHeader("Content-Type", "application/rdf+xml");

httpGet.addHeader("Configuration-Context", conf3 );

HttpResponse response = httpClient.execute( httpGet );


HttpEntity entity = response.getEntity();

String result = EntityUtils.toString(entity);

writeStringToFile(result, "out/getResourceFromCustomHttp.xml");

String ETag = response.getHeaders( "ETag" )[0].getValue();

Then, I change the file at out/GetResourceFromCustomHttp.xml to update the test plan’s title, description and the values at the sections “Business Objectives” and “DemoCustomSection” using the following code:

// Update test plan

File file = new File(


String resourceFromFile = new String (



HttpPut httpPut = new HttpPut( uri );

httpPut.setEntity(new StringEntity( resourceFromFile ));

httpPut.addHeader("Content-Type", "application/rdf+xml");

httpPut.addHeader("Configuration-Context", conf3 );

httpPut.addHeader("If-Match", ETag);

HttpResponse response = httpClient.execute( httpPut );


After that, the RQM application answers, as expected:

HTTP/1.1 200 OK

BUT only the title and the description of the test plan are updated! No updates of the test section are honored by the RQM API: Cells marked with red circles should show A7 and B7 labels, instead of A and B, so that data was NOT UPDATED. But, title and description, marked with green circles are correctly updated.

The data of Business Objectives was not updated: Data on red circle should say: “This is some default content 7”. But again, no update for both sections.

So, what is wrong/what additional steps or information should be done to update sections for a test plan created using a custom template? Could you provide some example?

As additional information, I include the XML to PUT, with the data updated. Also, some error found on the QM log.

XML used to PUT (update) the test plan:

<?xml version="1.0" encoding="UTF-8"?>
























   xmlns:xsd="" >

<rdf:Description rdf:about="">

 <dcterms:identifier rdf:datatype=""></dcterms:identifier>

 <dcterms:title rdf:datatype="">DemoCustomSection</dcterms:title>

 <rqm_qm:content rdf:datatype="">&lt;div xmlns="" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"&gt;{"columnNames":["Column1","Column2"],"value":[[["A7"],["B7"]]]}&lt;/div&gt;</rqm_qm:content>

 <process:projectArea rdf:resource=""/>

 <oslc:serviceProvider rdf:resource=""/>

 <oslc:instanceShape rdf:resource=""/>

 <rdf:type rdf:resource=""/>


<rdf:Description rdf:about="">

 <dcterms:identifier rdf:datatype=""></dcterms:identifier>

 <dcterms:description rdf:datatype="">Define the overall business goals and strategy for your test phase(s).</dcterms:description>

 <dcterms:title rdf:datatype="">Business Objectives</dcterms:title>

 <rqm_qm:content rdf:datatype="">&lt;div xmlns=""&gt;This is some default content 7&lt;/div&gt;</rqm_qm:content>

 <process:projectArea rdf:resource=""/>

 <oslc:serviceProvider rdf:resource=""/>

 <oslc:instanceShape rdf:resource=""/>

 <rdf:type rdf:resource=""/>


<rdf:Description rdf:about="">

 <dcterms:identifier rdf:datatype=""></dcterms:identifier>

 <dcterms:created rdf:datatype="">2019-02-19T15:39:13.130Z</dcterms:created>

 <rqm_qm:isLocked rdf:datatype="">false</rqm_qm:isLocked>

 <dcterms:modified rdf:datatype="">2019-02-21T18:54:06.212Z</dcterms:modified>

 <rqm_process:hasPriority rdf:resource=""/>

 <process:projectArea rdf:resource=""/>

 <dcterms:contributor rdf:resource=""/>

 <rqm_qm:richTextSection rdf:resource=""/>

 <oslc:instanceShape rdf:resource=""/>

 <dcterms:creator rdf:resource=""/>

 <rqm_qm:template rdf:resource=""/>

 <rqm_process:hasWorkflowState rdf:resource=""/>

 <dcterms:relation rdf:resource=""/>

 <oslc_config:component rdf:resource=""/>

 <dcterms:title rdf:datatype="">DemoTestPlan10 title updated 7</dcterms:title>

 <rqm_qm:shortIdentifier rdf:datatype="">52</rqm_qm:shortIdentifier>

 <acc:accessContext rdf:resource=""/>

 <dcterms:description rdf:datatype="">DemoTestPlan10 description updated 7</dcterms:description>

 <oslc:serviceProvider rdf:resource=""/>

 <rdf:type rdf:resource=""/>

 <rqm_qm:richTextSection rdf:resource=""/>

 <acp:accessControl rdf:resource=""/>

 <oslc:shortId rdf:datatype="">52</oslc:shortId>



Also, an error was found at the QM server’s log:

2019-02-21 13:25:13,769 [Default Executor-thread-2577031 @@ 13:25 vdegyves/qm/oslc_qm/contexts/_N0wpwfp3EeeN8owPg66FiQ/resources/] WARN - No corresponding risk exists in the project area

Don Yang commented Feb 21 '19, 10:27 p.m.
- I did not test locally but if you manually changed the section contents to the intended update and do a GET, then compare to the XML you PUT, do you see any difference there in terms of section contents you intended to update?
- for the warning messages, it is a known defect:

Victor Polo de Gyves Montero commented Feb 22 '19, 8:13 a.m.

Good idea. I manually changed the section contents. Then I did an HTTP GET to store and edit the returned XML. Then I returned the updated XML with an HTTP PUT. Alas, same result. I read from the answer of Paul Slauenwhite that Sections in the OSLC QM API are read-only. So that's the reason of this issue.

Accepted answer

permanent link
Paul Slauenwhite (8.4k12) | answered Feb 22 '19, 6:20 a.m.
Sections in the OSLC QM API are read-only.  Consider using the RQM Reportable REST API (

For the WARN in the RQM log, see Multiple instances of WARN No corresponding risk exists in the project area in the QM Log (179427).

Victor Polo de Gyves Montero selected this answer as the correct answer

One other answer

permanent link
Jim Amsden (25837) | answered Feb 22 '19, 2:26 p.m.

 You are attempting to PUT to a specific resource URL, TestPlan 52. However, the XML file you are trying to PUT has three resources, not one. I think the rich text and demo custom section are separate linked resources that would require their own PUTs and you'd need to add the links to the test plan.

Victor Polo de Gyves Montero commented Feb 22 '19, 3:05 p.m. | edited Feb 22 '19, 3:07 p.m.

Also tried that: By providing an XML for the specific resource and PUT to its URI returns HTTP 400. The data of the response contains an XML with the message:

AQXCM5010E A client error occurred while running the HTTP operation, PUT, at this URL: The response code is 400.

It seems Paul Slauenwhite's answer is correct. But I don't see how Rqm Reportable REST API supports components to access test artifacts. At least, RQMAPIUtility only provides access to default components.


Paul Slauenwhite commented Mar 26 '19, 3:50 p.m.

Note, the RQM Reportable REST API (see RQM API Utility (see and Update REST API Utility to be Configuration Aware (158462)) supports configurations.  Note, the OSLC Cleaner Utility does not support configurations (see Update OSLC Cleaner Utility to be Configuration Aware (168840)). 

Your answer

Register or to post your answer.