users@jersey.java.net

Serving another MIME than requested

From: Markus Karg <markus.karg_at_gmx.net>
Date: Thu, 18 Mar 2010 20:43:02 +0100

I have the need that my JAX-RS resource shall produce application/foobar+xml
when a client actually request test/xml. How can I do that? When I just
specify @Produces("application/foobar+xml") then a request for test/xml is
rejected with 406. :-(

 

Any ideas (besides manually setting the response header)?

 

Thanks

Markus