It's all about the answers!

Ask a question

HTTP POST images RQM


Hugo Troyan (11) | asked May 20, 10:11 a.m.
Hello,

I am currently developping a script that take as an input a .docx file (Word), which parses it as an understandable XML in order to POST it as a Test Case and/or Test Script in RQM.

My method works great, I can create Test Case and Test Script doing HTTP POST. The thing is I am having trouble to find how I can create a TC or TS containing images in the first place (in the docx file). So far my script just ignore them.

My HTTP POST Headers :
  • oslc-core-version: 2.0
  • Accept: application/rdf+xml
  • configuration-context: url of GC configuration
URL for Test Case : {RQM_HOST}/oslc_qm/contexts/{PA_ID}/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.select=dcterms:title,dcterms:identifier

With a body in XML :
<?xml version='1.0' encoding='utf-8'?>
<ns0:testcase xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns2="http://open-services.net/ns/config#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <dc:title>Test_001</dc:title>
   <dc:description>Description of Test Case</dc:description>
   <ns0:weight>100</ns0:weight>
   <ns0:category term="Safety Related" value="True" />
   <ns0:category term="Security Related" value="False" />
   <ns0:category term="Test Category" value="Unit Testing" />
   <ns0:category term="Type Of Test" value="Formal" />
   <ns0:customAttributes>
   </ns0:customAttributes>
</ns0:testcase>



As I said it is working great, but I cannot find how to insert images in this XML, if anyone knows how to proceed ?

Kind regards,
Hugo TROYAN

One answer



permanent link
Monika Rajput (2412) | answered Jun 01, 6:09 a.m.

Hi Hugo,


The OSLC API does not support creating an attachment. This can be achieved by using the REST API. Please check wiki Resources and their Supported Operations

Your answer


Register or to post your answer.