users@jersey.java.net

Re: [Jersey] Automatically converting model objects to JaxbElements / "Wrapping" providers

From: Johannes Schneider <mailings_at_cedarsoft.com>
Date: Tue, 08 Jun 2010 20:37:36 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06/08/2010 05:52 PM, Paul Sandoz wrote:
>> @Context Providers ps;
>
>
>> https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/ext/Providers.html
>
>
>> and calling:
>
>> https://jsr311.dev.java.net/nonav/releases/1.1/javax/ws/rs/ext/Providers.html#getMessageBodyWriter%28java.lang.Class,%20java.lang.reflect.Type,%20java.lang.annotation.Annotation[],%20javax.ws.rs.core.MediaType%29
>
>
>> for the type returned from bridge method?

Thanks! Works as expected.
It is a lot of hacking related to the genericType - but at least it
works....



Thanks,

Johannes


>> Paul.
>
>
> So can anybody give me a hint what direction I could take?
>
>
>
> To make it clear, here a small example:
>
> Model:
> - User
>
> JAXB-Model (easily created from User using my own User2JaxbBridge):
> - JaxbUser (annotated with XmlRootElement)
>
>
> My Resource is returning a User that shall be automatically converted to
> a JaxbUser (using my bridge) and then automatically to XML using the
> existing JAXB stuff in Jersey...
>
>
>
> Thanks,
>
> Johannes
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net


- --
Johannes Schneider - blog.cedarsoft.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMDo3tAAoJEAytD9R7Qv6dYb8IAO7LnvYzsmzFcRom7Zxl6A7h
YwOCrdtAGHid3B2nUt0nOvrMlDwFEjtM2rA5PL5FNQdHhbos4EVYL/0JzREz6fHv
8Kc+9yASlJYtawQws/3CGPkKijZcg6ZvR3Xa6jZgb4GhEuX45SLlLi1hVNyE8AtZ
V7/d6fHgDXVwq0wg6crCezs4Ofy5dVk+djD0eSzhb4aBXXiW/YLtL8kVL0/BGeUQ
qLEM1oleSRjH1e4w5V3XjufgImAj813FWXw0+vDb1PdWe50/HWAo5puy9boroUFC
sRdkuPa6lq4fw4dQIvH/MFojt58rszKYhcearB4+KH+DO4cgw2Zdoy44Wiq9WIM=
=a8v9
-----END PGP SIGNATURE-----