users@jersey.java.net

[Jersey] Re: Provider media type matching?

From: Mike Summers <msummers57_at_gmail.com>
Date: Mon, 16 Jul 2012 13:38:19 -0500

I'm using @Produces/_at_Consumes on the reader/writer methods, although the
way my classes are structured the writer class also only handles a
consumes of lua.

My best guess is I need to make sure the @Produces/_at_Consumes are in
completely separate classes, hoping that a @Consumes of JSON or XML will be
picked-up by their default Providers.

Thoughts?

On Mon, Jul 16, 2012 at 1:14 PM, Martynas Jusevičius
<martynas_at_graphity.org>wrote:

> Mike,
>
> have you registered them in Application.getClasses()/getSingletons()?
>
> Martynas
> graphity.org
>
> On Mon, Jul 16, 2012 at 9:12 PM, Mike Summers <msummers57_at_gmail.com>
> wrote:
> > How are @Provider Produces/Consumes types matched?
> >
> > I have a Provider that both Produces and Consumes Lua, I'd also like to
> be
> > able to Consume XML or JSON with the built-in Providers and reply with
> Lua
> > from my Provider.
> >
> > I can't seem to come-up with the right combination of Produces/Consumes
> > values in my Lua Provider to make this happen but it seems like it
> should be
> > possible.
> >
> > Help?
> >
> >
>