It's all about the answers!

Ask a question

Error when create workitem via Rest API

Ruslan Luchnikov (3121311) | asked Aug 02 '12, 2:38 a.m.
edited Aug 02 '12, 10:18 a.m.
Hi, guys
I try create workitem via Rest API with attribute(Description) containing text inside  <text>.  After creating wortkiten in Rational Team Concert the text and <> is removed.
<oslc_cm:ChangeRequest xmlns:rdfs="" xmlns:oslc_disc="" xmlns:dc="" xmlns:opensearch="" xmlns:oslc_cm="" xmlns:jp="" xmlns:atom="" xmlns:oslc_qm="" xmlns:rdf="" xmlns:calm="" xmlns:rtc_cm="" xmlns:jd="" xmlns:oslc_rm=""><dc:type rdf:resource="https://stend-fr2:9443/jazz/oslc/types/https://eld64:9443/jazz/oslc/contexts/_dlsysLIzEeGCN8XOKY-7rQ/workitems/ЗНИ"/><dc:description>test <test> test</dc:description><rtc_cm:id_ppmc>132403</rtc_cm:id_ppmc><dc:title>132403 <test> 12345</dc:title><rtc_project_name>Test</rtc_project_name><rtc_cm:state></rtc_cm:state><rtc_cm:автор>Admin User</rtc_cm:автор><rtc_cm:номер>132111</rtc_cm:номер></oslc_cm:ChangeRequest>

2 answers

permanent link
Lionel Li (21611216) | answered Aug 02 '12, 2:23 p.m.
edited Aug 03 '12, 9:32 a.m.
The error is caused most likely by the illegal char "<" and ">" to the xml entity

you can give a try with

<dc:description>test &amp;lt; &amp;lt;  &amp;gt; &amp;gt; test</dc:description>

hope it works

permanent link
Ruslan Luchnikov (3121311) | answered Aug 06 '12, 5:12 a.m.
edited Aug 06 '12, 5:33 a.m.
Hi all
i try encode under XML specification(How i can insert HTML in forum?)
And in time creating workitem the text area between symbols (&lt and &gt) and symbols themselves were removed.

Your answer

Register or to post your answer.