users@jersey.java.net

[Jersey] Problem Differentiating REST APIs with different @QueryParams

From: Tope Faro <topriddy_at_gmail.com>
Date: Fri, 19 Apr 2013 13:24:40 +0100

Hi all,

I am currently having problems using Jersey API as I cannot map the
theoretic REST in principle to it's implementation with Jersey Library.

At the moment, I am facing an error below:

*SEVERE: Producing media type conflict. The resource methods public
java.util.List
com.topriddy.rest.CustomServiceResource.getAllInventoryItemsByInventoryCategoryId(java.lang.Long)
and public java.util.List
com.topriddy.rest.CustomServiceResource.getAllInventoryItemsByInventoryCategoryIdAndDeleted(java.lang.Long,java.lang.Boolean)
can produce the same media type*
*
*
The above seems to be caused by the fact that I am trying to create an api
where i can get list of inventories based by different query parameters.

The issue is i would wish to be able to differentiate method calls by
@QueryParams just as demonstrated in the Teach a Dog Rest examples.

 /dogs?color=red&state=running&location=park