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 |
One answer
Steve Speicher (317●6●5)
| answered Mar 30 '11, 5:58 p.m.
JAZZ DEVELOPER edited Aug 28 '14, 8:39 a.m. by Krzysztof Kaźmierczyk (7.5k●4●80●103)
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 |
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.