users@jersey.java.net

[Jersey] Cyclic Graphs / Custom de-serialisation

From: David Marsh <dmarsh26_at_hotmail.com>
Date: Sun, 9 Oct 2011 19:01:21 +0000

Hello,
I have my domain model which has various relations and bi-directional associations, parent - child etc.
In order to allow for Jersey Marshalling I have had to use @XmlID and @XmlIDREF annotations.
This effectively short cuts the graph and only serializes a section.
Now certain entities do not de-serialise correctly because they have been pruned from the XML.
I would like to find some way to fix this.
Since there appears to be no true graph support in Jersey I need a workaround.
I was thinking that maybe there is some sort of de-serialisation context where I can intercept the XML/JAXB and turn ID's back into objects in the Jersey client.
Is this possible ? Any thoughts on how to go about it ?
many thanks
David Marsh