users@jersey.java.net

Re: [Jersey] Looking for "best practices"

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Tue, 19 Jan 2010 11:02:25 +0000

On Jan 14, 2010, at 3:45 PM, Moises Lejter wrote:

> I'm thinking what you want is to do is (1) have your clients specify
> different acceptable MIME types, depending on whether they want
> heavy- or light-weight responses, then have your own
> MessageBodyWriters for each of the MIME types you define (on top of
> the built-in "application/xml" ...
>

Another approach is to specify different URLs, say using query
parameters, to return different JAXB beans that will be marshalled.

Paul.