Hi,

If you need to use a MessageBodyWriter, it needs to be annotated @Provider
and implement the interface.

http://jackson.codehaus.org/javadoc/jax-rs/1.0/javax/ws/rs/ext/MessageBodyWriter.html

then it should get picked up automatically.


On Fri, Jul 26, 2013 at 3:20 PM, Nick Khamis <[email protected]> wrote:

> Romain, i'm sorry I am drawing a blank. Could you please elaborate? I just
> have a simple resource:
>
> @GET
> @Produces({ MediaType.APPLICATION_JSON})
> public List<Wine> findAll() {
> System.out.println("findAll");
> return dao.findAll();
> }
>
> And a web.xml (3.0) pointing to the resource. This is for JAX-RS 2.0 and
> maven within TOMEE.
> Is there specific example that meets this simple scenario? I did find this
> simple example
> but could not see any mention of adding a json writer?:
>
> http://tomee.apache.org/examples-trunk/rest-example/README.html
>
>
> Sorry, a noob right now...
>
> Nick.
>

Reply via email to