Tatu Saloranta wrote:
> The question, then, is if and how to configure Jersey
> to use that stream writer impl.
Right, the current way to do this is provide your own JAXBContext
implementation (see ContextResolver<JAXBContext> for the JAXB Java types
that require CDATA encoding). The JAXBContext would return a marshaller
that would use the StAX wrapping as you suggested. But IMHO that is a
still lot of work. Almost requires a supplied out of the box solution,
but i am not sure the use-case warrants the degree of work required.
The other, simpler way, is to roll your own message body writer for
certain JAXB types that require such CDATA functionality.
Paul.
> It would even be
> possible to create one's own XMLOutputFactory to
> produce such wrapped writers (and use system property
> to make JDK use that).
> But hopefully that would not be necessary.
>
> -+ Tatu +-
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
--
| ? + ? = To question
----------------\
Paul Sandoz
x38109
+33-4-76188109