You should be able to implement your own message body writer
which would produce transformed output.
The new provider could delegate XML marshaling to existing
JAXB message body writers (see [1] on how you can get them injected)
and only take care of the transformation using e.g. javax.xml.transform
API (see [2]).
On 29.10.2011 3:08, DaHoopster wrote:
> I am working on a project that I need such a filter or mechanism to modify
> the XML marshalled by the message body writer before returning to the
> client.
>
> I need to apply a XSLT on the XML for several resources. It looks like
> ContainerResponseFilter is not suitable for the job since it is invoked
> before marshalling.
>
> Is there a way to achieve this via Jersey? I am using Jersey 1.6
>
> Regards,
> Han
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Need-to-modify-the-response-entity-stream-after-marshalling-happened-tp6942294p6942294.html > Sent from the Jersey mailing list archive at Nabble.com.
>