On 07/03/12 03:07, Ari King wrote:
I've configured a method to receive query string parameters (see
below), but it does NOT receive all sent parameters.
public Response lookup (@QueryParam("") CriteriaDto criteria) { ... }
Seemingly encoded parameters are NOT populated in the DTO. For example,
given --
Raw query string: ?locations[]=10001&name=ari
Encoded query string: ?locations%5B%5D=10001&name=ari
The "locations[]" parameter is ignored, whereas "name" is populated
in the CriteriaDto.
? locations=10001
should do, even if it's an array property on CriteriaDto
Cheers, Sergey
Changing from locations[]=10001 to locations=10001 worked.
But is there a way to make locations[]=10001 work? Thanks.
Is having 'locations[]' important for the consumers of the application ?
if yes - then you can use 'locations[]' but it won't work in conjunction
with the CXF parameter beans support, you'd need to handle the query
parameters manually...
Cheers, Sergey
Best,
Ari
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Blog: http://sberyozkin.blogspot.com