users@jersey.java.net

Re: namespace prefix mapping

From: A S Manzoor <ilyanov_at_mac.com>
Date: Tue, 9 Oct 2007 18:16:48 +0200

Thank you Marc.

So thats how Atom entries magically get morphed in and out :-) So
technically, all the supported representations are in
com.sun.ws.rest.impl.provider.entity . I will get to looking at the
implementation to see how how I could create an XML representation of
my objects. I have not looked at the annotations but What exactly
does @ProduceMime and_at_ConsumeMime actually do? Do they do anything in
terms of negotiating the representations? Again, thanks Marc,

Cheers
su./hail


On Oct 9, 2007, at 4:10 PM, Marc Hadley wrote:

> On Oct 7, 2007, at 7:48 AM, A S Manzoor wrote:
>>
>> Is there anyway I can set the properties on the jaxb marshaller? I
>> am using Jaxb to in and out XML representations and it would be
>> nice to have readable namespace prefixes instead of ns1 and so on.
>> Jersey is so good, I have no clue how its converting to and from
>> XML (and i mean that as a compliment). It would be nice to get my
>> hand on the marshaller to set the namespace prefix mapper. Thanks
>> for your help.
>>
> There's currently no simple way to accomplish what you want. We
> have discussed a few ideas related to application supplied JAXB
> contexts but haven't decided on an approach yet.
>
> For now you could create your own custom JAXB entity provider and
> bundle that with your application. Paul's blog entry[1] provides
> lots of detail on how to do that and you could base your new entity
> provider on the existing JAXB one:
> com.sun.ws.rest.impl.provider.entity.JAXBElementProvider.
>
> Hope that helps.
> Marc.
>
> [1] http://blogs.sun.com/sandoz/entry/plugable_types_with_jax_rs
>
>> Cheers
>> su./hail
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>