users@jersey.java.net

Re: [Jersey] Jersey thinks _at_MatrixParam is an entity

From: Kevin Duffey <andjarnic_at_yahoo.com>
Date: Wed, 31 Dec 2008 14:32:04 -0800 (PST)

QueryParam is a query attribute.. ?attr=value.. so it's ok to use that. I actually dont know what MatrixParam is, but the error you are getting is because a GET should not take in a body entity at all. I'll have to look up MatrixParam, but it seems as if that comes across like an entity body and Jersey is preventing that. But.. I thought a QueryParam is only a string value.. you have a List<List<String>> in there.. which would seem wrong to me as a QueryParam. I could be wrong.. I've only used it to get attr=value query params.





________________________________
From: Gili <cowwoc_at_bbs.darktech.org>
To: users_at_jersey.dev.java.net
Sent: Wednesday, December 31, 2008 12:07:25 PM
Subject: Re: [Jersey] Jersey thinks @MatrixParam is an entity


It turns out that if you replace @MatrixParam with @QueryParam the problem
magically goes away. I filed a new bug report:
https://jersey.dev.java.net/issues/show_bug.cgi?id=176

Gili


Gili wrote:
>
> I defined the following method:
>
> @GET
> @Produces(MediaType.APPLICATION_XML)
> public Response getRandomImages(@MatrixParam("tag") List<List<String>>
> oneOfTags)
>
> Jersey complains: A HTTP GET method, public javax.ws.rs.core.Response
> somePackage.RandomImageResource.getRandomImages(java.util.List), should
> not consume any entity.
>
> Am I doing anything wrong or does this seem like a bug to anyone else?
>
> Thank you,
> Gili
>

-- 
View this message in context: http://n2.nabble.com/Jersey-thinks-%40MatrixParam-is-an-entity-tp2097066p2097102.html
Sent from the Jersey mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net