Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

load new category values into RQM using REST

 We followed the documentation in 
https://jazz.net/wiki/bin/vilew/Main/RQMURLUtility
https://jazz.net/wiki/bin/view/Main/RqmApi#Troubleshooting

We used FireFox ResetClient to invstigate an existing category in order to create an input XML file as specified here:
https://jazz.net/wiki/bin/view/Main/RqmApi#Generated_ID

We identified the XML presentation of a category using this url:
https://129.35.209.200:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/category
In order to insert a new category to an active RQM project, we created an XML 


We send the following command:
java -jar RQMUrlUtility.jar -command POST -user clmadmin -password XXXXX -context qm -filepath /home/maroshi/Downloads/RQM-Extras-RQMUrlUtil-4.0.1/categoryPostRequest.xml -url https://129.35.209.200:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/category/cat1

cat1 is the category type

Our categoryPostRequest.xml context is:

    <?xml version="1.0" encoding="UTF-8"?>
    <ns2:category 
xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" 
xmlns:ns1="http://schema.ibm.com/vega/2008/" 
xmlns:ns3="http://purl.org/dc/elements/1.1/" 
xmlns:ns4="http://jazz.net/xmlns/prod/jazz/process/0.6/" 
xmlns:ns5="http://jazz.net/xmlns/alm/v0.1/" 
xmlns:ns6="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
xmlns:ns7="http://purl.org/dc/terms/" 
xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" 
xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" 
xmlns:ns10="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" 
xmlns:ns11="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" 
xmlns:ns12="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" 
xmlns:ns13="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" 
xmlns:ns14="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" 
xmlns:ns16="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" 
xmlns:ns17="http://www.w3.org/1999/XSL/Transform">
    <ns2:projectArea alias="JKE+Banking+%28Quality+Management%29" href="https://129.35.209.200:9443/qm/resource/itemOid/com.ibm.team.process.ProjectArea/_yQlosEESEeKJfvaUoytc5g"/>
    <ns3:title>cat1.3</ns3:title>
    <ns2:categoryType href="https://129.35.209.200:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/categoryType/urn:com.ibm.rqm:categoryType:_bA3ngoVzEeK5xerYymXkYA"/>
    </ns2:category>

We fail with response 401, we do not know how to further investigate and get better diagnostic response.
1. Please advise what is the correct  request URI
2. Please advise what is the content of the correct categoryPostRequest.xml

0 votes


Accepted answer

Permanent link
It's hard to determine the root cause without the QM log.  One thing to check would be if the category type exists. 

Note, a POST request should not contain an external ID (see https://jazz.net/wiki/bin/view/Main/RqmApi#id).
yair shaked selected this answer as the correct answer

0 votes

Comments

2013-03-05 10:28:35,841 [             WebContainer : 14]  INFO com.ibm.rqm.planning                                - Failed to parse XML for PUT request https://129.35.209.200:9

443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/category/slug__WK9Y8IWpEeK5xerYymXkYA
javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.]

Looks like categoryPostRequest.xml did not contain the XML prolog.  If it did, please remove it.


One other answer

Permanent link
Your request/XML looks good.  The problem is the 401 (Unauthorized) response code suggesting your user does not have sufficient privileges to create categories.

0 votes

Comments

 i'm sorry the error is 400 , bad request  and not 400 , (typo error)


Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Mar 05 '13, 5:52 a.m.

Question was seen: 4,867 times

Last updated: Mar 05 '13, 12:25 p.m.

Confirmation Cancel Confirm