I have a JPA entity class mimicking a table. Something like this:
@XmlType(name="MyClassElementType")
public class MyClass {
String name;
String xmlDesc;
public MyClass() {}
@XmlElement
String getName() { return name; }
void setName(String name) { this.name = name; }
@XmlElement
String getXmlDesc() { return xmlDesc; }
void setXmlDesc(String xmlDesc) { this.xmlDesc = xmlDesc; }
}
In a Jersey REST get call I'm trying to return this class:
@Get
@Produces("application/xml")
public MyClass get() {
return myClass;
}
Now I'm expecting the already xml string(xmlStr) to be returned as is, but Jersey/JAXB escapes it...
So anyway around this?