Hi Frank,
On 04/01/12 23:50, Geary, Frank wrote:
Hi,
I use a Java class to specify my expected query parameters using
@QueryParam(āā). But Iām wondering what is the Apache CXF
easiest/recommended way to determine when extraneous (or even
misspelled) parameters were passed in so I can generate an error. I
cannot just ignore extra params. Any suggestions?
One option is to register a custom RequestHandler filter and get UriInfo
injected, and in the filter's handle method do check
uriInfo.getQueryParameters and throw an exception if an unrecognized
query is found
If needed you can avoid using @QueryParam("") and work directly with
UriInfo in the application code
Cheers, Sergey
Thanks
Frank Geary