users@jersey.java.net

RE: Change default Xml Encoding

From: Ben <ben.mail_at_vtxfree.ch>
Date: Thu, 10 Apr 2008 15:12:12 +0200

Hi Paul,

I am getting again into the server part.. And was wondering if the state is
still as in feb for creating jaxb responses of a different encoding. I have
nothing against some plumbing if it's a one time effort, however as it seems
to me the types produced by the resolver have to be hardcoded

private final Class[] cTypes = {...};

Generating a nasty dependency. Pls correct me if I'm wrong. I imagine a
different encoding requirement will be especially for all non-english
locales almost always the case. Is there no plan to make this more easy
configurable, even at startup?

Thxs ben

-----Original Message-----
From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
Sent: Mittwoch, 6. Februar 2008 10:22
To: users_at_jersey.dev.java.net
Subject: Re: Change default Xml Encoding


Hi Ben,

Ben wrote:
> Hi there,
>
> I wonder what is the easiest way to specify for a Resource that
> produces
> "application/xml" a jaxb.encoding of ISO-8859-1 instead of the default
> UTF-8?
>

It is not possible to do this in 0.5. But it is possible in 0.6:

   https://jersey.dev.java.net/servlets/ReadMsg?list=users&msgNo=598

It seems a little involved but with some helper classes it should take
the pain away. Maybe the tooling can generated some code for such
customization.

Paul.

> Rigth now i have more or less just the converters and resources that
> come with nb6.0 ->generate rs from entity classes.
>
>
>
> Thanks! Ben
>

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net