Every book on REST uses <atom:link href="..." rel="...">
to define Hypermedia in RESTful apps; but Jersey (with the use of JAXB) do not seems to have this support.
I've tried @XmlSchema
in package-info.java as explained here; I've also tried extendingNamespacePrefixMapper
as explained there. But none works and output this at best:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customer xmlns:ns2="http://www.w3.org/2005/Atom">
<first-name>Roland</first-name>
<ns2:link href="/customer/1" rel="self" />
</customer>
Using namespace and, as a result, Atom, seems impossible in Jersey. I've miss something?
ps. I'me using a XSD to generate @XmlElement
classes, and, for the moment, I create my own Link class. Is there a schema or a JAR to do that (jersey-atom
maven dependency uses rome
but without any help)