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 >
