It's all about the answers!

Ask a question

need help creating a testcase in RQM using RESTAPI

Vinod Reddy (1326) | asked Aug 03 '12, 4:53 p.m.
edited Aug 06 '12, 10:24 a.m.
Hi - i am trying to create a testcase using a RESTAPI
i have build the following  readtest.xml XML, see below

then, ran the command as:
java -jar c:\Keydata\Omnifind\ICA\QA\RQM\RQMUrlUtility.jar -command POST -user -password xxxxxxx -filepath c:\Keydata\Omnifind\ICA\QA\RQM\readtest.xml -url https://hostname:9450/jazz/service/

But it fails with following error:

RQMUrlUtility: Connected to using project "Discovery"
Aug 3, 2012 4:47:18 PM org.apache.commons.httpclient.HttpMethodDirector isRedirectNeeded
INFO: Redirect requested but followRedirects is disabled
RQMUrlUtility: Calling [ HTTP POST ] method to upload ATTACHMENT to Attachment Feed
RQMUrlUtility: Server Response code: 415
i cannot from anywhere what the response code 415 means!

note: i read through another post similar to this topic but the suggestions from that post did not help.
Appreciate your expert help here!

<?xml version="1.0" encoding="UTF-8"?><testcase xmlns="" xmlns:ns10="" xmlns:ns11="" xmlns:ns12="" xmlns:ns2="" xmlns:ns3="" xmlns:ns4="" xmlns:ns5="" xmlns:ns6="" xmlns:ns7="" xmlns:ns8="" xmlns:ns9=""><ns4:title>VINODXXXTEST</ns4:title><ns4:description>VINODXXXTEST</ns4:description><weight>100</weight><category term="Test Type" value="Integration Test"/><variables/><template href=""/></testcase>

3 answers

permanent link
Hao Wan (1.5k35) | answered Aug 16 '12, 5:35 a.m.
what's more if you want to use POST request to create testcase, you can use poster

permanent link
Hao Wan (1.5k35) | answered Aug 16 '12, 5:33 a.m.
Hi Vinod,
as you are using UrlUtility, you need to change the POST request to PUT and append a testcase id,
you can use the following url
java -jar c:\Keydata\Omnifind\ICA\QA\RQM\RQMUrlUtility.jar -command PUT -user -password xxxxxxx -filepath c:\Keydata\Omnifind\ICA\QA\RQM\readtest.xml -url https://hostname:9450/jazz/service/

because for UrlUtility, POST is only for attachment artifact
please refer to
Artifact upload --:
-command PUT -user ADMIN -password ADMIN -filepath C:\\RQMUrlUtility_PUT.txt
-url https://localhost:9443/qm/service/

Attachment upload --:
-command POST -user ADMIN -password ADMIN -filepath C:\\RQM_Attachment.jpg
-url https://localhost:9443/qm/service/


Vinod Reddy commented Aug 16 '12, 4:03 p.m.

thanks! that worked!

permanent link
Pramod Chandoria (2.1k11220) | answered Aug 04 '12, 11:26 a.m.
Hi Vinod,
414 response means "Unsupported media type"
Not sure why are you seeing this message when actually testcase is being uploaded
RQMUrlUtility: Calling [ HTTP POST ] method to upload ATTACHMENT to Attachment Feed
You can send me email with your xml file and also would like to remove the name of server (IP) in this post

Vinod Reddy commented Aug 06 '12, 10:22 a.m.

HI Pramod - thanks for your response. am sending the xml file in email, i dont find an option here to attach a file.

Vinod Reddy commented Aug 06 '12, 10:24 a.m.

also the reponse code am getting is 415, not 414. Thanks!

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.