POST requirement and primary text (with OLSC API) - wrong formatting
![]()
Hi,
I have the following atribute in a requirement <oslc_rm:Requirement>:
I'm trying a simple operation of creating a new requirement with a table in jazz_rm:primaryText:
So I used the link:
===
https://localhost:9443/rm/requirementFactory?projectURL=https://localhost:9443/rm/process/project-areas/_Mu4ToBLbEea_geXMea33fg:
==
With Headers:
OSLC-Core-Version 2.0
Accept application/rdf+xml
Content-Type application/rdf+xml
and I passed the following POST body:
===
rdf:RDF
(..)
<jazz_rm:primaryText rdf:parseType="Literal">
div xmlns="http://www.w3.org/1999/xhtml">
p dir="ltr"> </p>
table border="1" cellpadding="1" cellspacing="1" dir="ltr" id="_1463401786702" style="width:500px">
<body>
tr>
td colspan="1" rowspan="1" style="width: 250px;">a</td>
td colspan="1" rowspan="1" style="width: 250px;">1</td>
/tr>
tr>
td colspan="1" rowspan="1" style="width: 250px;">b</td>
td colspan="1" rowspan="1" style="width: 250px;">2</td>
/tr>
tr>
td colspan="1" rowspan="1" style="width: 250px;">c</td>
td colspan="1" rowspan="1" style="width: 250px;">3</td>
/tr>
/tbody>
/table>
p dir="ltr"> </p>
/div>
</jazz_rm:primaryText>
(...)
==
I get a 403 response and an error message saying:
===
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:err="http://jazz.net/xmlns/prod/jazz/foundation/1.0/">
<rdf:Description>
<err:detailedMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>CRRRS6401E Error parsing content. Content must be valid rdf+xml.</err:detailedMessage>
<err:errorMessage rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
>Forbidden</err:errorMessage>
<err:errorStatus rdf:datatype="http://www.w3.org/2001/XMLSchema#long"
>403</err:errorStatus>
</rdf:Description>
</rdf:RDF>
==
"Content must be valid rdf+xml.". What am I doing wrong? If I delete the <jazz_rm:primaryText > the item is created so I know the problem is there. (I had to remove some opening tags "<" so that tables wouldn't appear
Thank you!
|