users@jersey.java.net

Re: [Jersey] Reprocess xml generated

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 23 Sep 2009 16:51:13 +0200

On Sep 21, 2009, at 12:25 AM, bea wrote:

> Hi,
>
> Finally I think I'll write my own MessageBodyWriter. I wasn't
> thinking of processing at XML level, I only wanted to make
> 'aesthetic' changes in the XML.
>

What aesthetic changes are you referring to?

I am wondering, rather than a message body writer you might be able to
override the JAXB marshaller and pass in your own SAX stuff. I can
supply more details as required.

Paul.


> Thanks both for your replies.
> Cheers.
>
>
> On Sun, Sep 20, 2009 at 4:11 AM, Tatu Saloranta
> <tsaloranta_at_gmail.com> wrote:
> On Fri, Sep 18, 2009 at 12:34 AM, bea <beaotx_at_gmail.com> wrote:
> > Hi,
> >
> > I've a method with a @GET annotation, that produces json and xml
> formats,
> > and returns an object with JAXB annotations. I'd like to know if
> it's
> > possible to post-process the xml generated before it is send to
> the client,
> > I mean, I'd like to use a post-method in order to parser the xml
> generated.
>
> Are you thinking of processing at XML level (SAX or Stax events)?
> Theoretically it should be possible to allow interception at this
> level, before said events reach listener/writer that writes serialized
> XML.
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>