|
From: Xavier C. <xc...@gm...> - 2011-11-14 12:21:23
|
Hello Heiko,
Can you try with a GenericEntity wrapper to your list of domain entities ?
Response foo() {
GenericEntity<List<MyType>> x = new GenericEntity<List<MyType>>();
...
return Response.ok(x).build();
}
HTH
Best regards,
/Xavier
On Sun, Nov 13, 2011 at 10:47 PM, Heiko W.Rupp <hr...@re...> wrote:
> Hi,
>
> I am running into those
> Could not find MessageBodyWriter for response object of type:
> java.util.ArrayList of media type: application/xml
> with whatever provider when I do
>
> Response foo() {
> List<MyType> x = new ArrayList<MyType>();
> ...
> return Response.ok(x).build();
> }
>
> while
>
> List<MyType> foo() {
> List<MyType> x = new ArrayList<MyType>();
> ...
> return x;
> }
>
> works like a charm.
> While the latter is more obvious to write, I'd like to use the former to
> be able to pass additional info like
> etags and so on.
> Is this a known issue? Or am I just doing it wrong?
>
> Thanks
> Heiko
>
>
> --
> Reg. Adresse: Red Hat GmbH, Technopark II, Haus C,
> Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
> Handelsregister: Amtsgericht München HRB 153243
> Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
> Charles Cachera
>
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Xavier
|