cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan King <dan.king...@yahoo.com>
Subject Re: Unable to Map QueryParam to Object
Date Wed, 07 Dec 2011 18:10:12 GMT
> Does anyone know why I'm unable to map query parameters via @QueryParam to 
> an object? For example, if I enter:
> 
> http://127.0.0.1/search?term=java&max=10&offset=10  
> 
> Only the "term" parameter is captured. Below are the relevant pieces 
> of code.
> 
> 
> @Path("/search")
> public class SearchService {
>   ...
>   ...
>     @GET
>     @Path("")
>     @Transactional
>     public Response search(@QueryParam("") SearchQuery query) {
>       ...
> 
>     }
> }
> 
> public class SearchQuery {
>     
>     private String term;
>     private Integer zipCode;
>     private Integer range;    
>     private Collection<String> types;
>     private Integer max;
>     private Integer offset;
> 
>     ...
>     // Getters and Setters for the above properties
> 
> 
> }

Sorry, I forgot to mention I'm using CXF JAX-RS version 2.4.2.

-Dan


Mime
View raw message