users@jersey.java.net

[Jersey] Re: Adding grammar to the resources

From: Cameron Jones <cmhjones_at_gmail.com>
Date: Tue, 30 Jul 2013 12:21:27 +0100

Hi Nick,

JAX-RS doesn't dispatch based on only differences in query parameters...see
this bug which has been marked as WONTFIX:

http://java.net/jira/browse/JAX_RS_SPEC-33

Thanks,
Cam


On Tue, Jul 30, 2013 at 1:58 AM, Nick Khamis <symack_at_gmail.com> wrote:

> When I remove the @Path, I am getting the following error:
>
> These two methods produces and consumes exactly the same mime-types and
> therefore their invocation as a resource methods will always fail.
>
> I have:
>
> @Path("/wines")
> public class WineResource
>
> @GET
> @Produces({MediaType.APPLICATION_JSON})
> public List<Wine> findAll()
>
> @GET
> @Produces({MediaType.APPLICATION_JSON})
> public List<Wine> findByName(@QueryParam("name") String name)
>
> @GET
> @Produces({MediaType.APPLICATION_JSON})
> public Wine findById(@QueryParam("id") String id)
>
> Thanks in Advance,
>
> Nick.
>