OSLC4J: Cannot get a ChangeRequest that contains special characters
Hello everyone,
I am trying to get a ChangeRequest from IBM Jazz using OSLC4J Library, but I have a problem when that ChangeRequest (in IBM called EWM workitem) contains special characters (e.g. quotation marks) in some of the fields.
When the workitem contains quotation marks in the Title or the Description (which are standard dcterms attributes) then the request works and the item is retrieved,
But,
When the special characters are in the extended/custom properties, for example “Requested Due Date Change Reason” custom text field, then it gives me the error HTTP 400 Bad Request caused by illegal instance of Datatype rdf:XMLLiteral (see the stacktrace at the end).
I checked the raw response and all text fields are of type XMLLiteral, so both the title and “Requested Due Date Change Reason” field are XML Literals, the only difference is that the title (and the description) are represented using dcterms and “Requested Due Date Change Reason” is rtc_ext.
StackTrace:
Caused by: org.apache.jena.datatypes.DatatypeFormatException: Lexical form '"test"' is not a legal instance of Datatype[http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral] Bad rdf:XMLLiteral
at org.apache.jena.graph.Node_Literal.getLiteralValue(Node_Literal.java:44)
at org.apache.jena.rdf.model.impl.LiteralImpl.getValue(LiteralImpl.java:98)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.handleExtendedPropertyValue(JenaModelHelper.java:1154)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromResource(JenaModelHelper.java:659)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.createObjectResultList(JenaModelHelper.java:528)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.fromJenaModel(JenaModelHelper.java:402)
at org.eclipse.lyo.oslc4j.provider.jena.JenaModelHelper.unmarshal(JenaModelHelper.java:369)
at org.eclipse.lyo.oslc4j.provider.jena.AbstractOslcRdfXmlProvider.readFrom(AbstractOslcRdfXmlProvider.java:305)
Thanks,
Ana