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

Creating Work Item Using RTC REST API

Hi..

I am new to RTC and am using the REST API of RTC to migrate tickets from another application.

Currently I am using Apache HTTP Components (http://hc.apache.org/) to post the data to RTC. But I am having the following error:
<?xml version="1.0" encoding="UTF-8"?><oslc_cm:error xmlns:oslc_cm="http://open-services.net/xmlns/cm/1.0/">
<oslc_cm:status>400</oslc_cm:status>
<oslc_cm:message>Malformed XML: The prefix "oslc_cm" for element "oslc_cm:factory" is not bound.</oslc_cm:message>
</oslc_cm:error>

I am following the documentation available at https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2#Creating_Work_Items.

and my data sample is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<oslc_cm:factory oslc_cm:default="true">
<dc:description>Creating Work Item From REST API</dc:description>
<dc:subject>Creating Work Item From REST API</dc:subject>
<dc:title>Creating Work Item From REST API</dc:title>
</oslc_cm:factory>

Could anyone help or advise.

Many thanks,
Shameem

0 votes



One answer

Permanent link
The error you are seeing is that the XML you are using is not well-formed (namespace prefixes are not defined). You need to define well-formed XML before sending the content to RTC in the request.

A full example is available in this useful Jazz.net article http://jazz.net/library/article/352

1 vote

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

Question asked: Mar 30 '11, 4:46 p.m.

Question was seen: 13,936 times

Last updated: Aug 28 '14, 8:39 a.m.

Confirmation Cancel Confirm