Hi Romain, thanks for the answer.
Do you have a little more pointer? I tried some things in that direction but couldn't get anything working. Not even meaningful logs and/or exception. I guess in my case using Jackson would be the best option. How can I have the Jackson MessageBodyReader/Writer discovered (they are already defined as services)? Isn't what 'openejb.jaxrs.providers.auto=true' is supposed to do? I am willing to spend some time improving one of tomee rest example. Looks like it's such a basic use case it should be dead easy to get working. Julien 2013/4/11 Romain Manni-Bucau <[email protected]> > Well, there isnt a unique solution. Basically it works out of the box using > jaxb annotations on your pojo. > > That said here is the best compromise to get a good control: > * create a custom @Provider delegating to jackson (added in the webapp) > * configure it in openejb-jar.xml > > Thats the easiest provider to use and clearly the fastest > Le 11 avr. 2013 02:20, "Julien Eluard" <[email protected]> a écrit : > > > Hi, > > > > when trying to send a List of POJOs (as application/json) via JAX-RS I > get > > the infamous: > > WARNING: No message body writer has been found for response class List. > > > > Googling around I can find several suggestions to fix that (setting some > > Java properties, using Jackson, introducing an openejb-jar.xml). None > work > > and it looks like the solution evolved over time. > > What is the correct way to solve this with Tomee 1.5.1 JAX-RS edition? > > Although is there a good reason this cannot be supported out-of-the-box? > > That's a little frustrating.. > > > > I can make things kind of work using XMLRootElement on my POJO but then I > > have a extra JSON level whose name is derived from my Class name. Kind of > > ugly. > > > > Thanks! > > Julien > > >
