users@jersey.java.net

Selecting subrule by _at_QueryParam

From: Martin Probst <mail_at_martin-probst.com>
Date: Fri, 26 Jun 2009 09:36:17 +0200

Hi,

I have two classes like this:

class A {
  @GET
  Response doFoo(@QueryParam("param") String param) { ... }
}

class B extends A {
  @GET
  Response doGet() { ... }
}

(I'm not sure the inheritance thing has anything to do with it, need
to test that).

So I have two methods on the Resource, both of which support a @GET
request, but one of them takes a ?param=value parameter. Is this
possible at all in JAX-RS? Or do I need to disambiguate by path or
similar?

I get this error message:
class B has ambiguous resource method for HTTP method GET and output
mime-type: */*. The problematic mime-type sets (as defined by
@Produces annotation at Java methods get and query) are [*/*] and
[*/*]

Regards,
Martin