Hi This has been fixed on the trunk, but what is also possible to do is to register a custom CXF JAX-RS RequestHandler filter (same way as the custom ExceptionMapper) and have this filter replacing the value which is not recognized by the Date constructor accepting String.
For ex, lets assume it's a query parameter. So you can do String query = message.get(Message.QUERY_STRING) // replace it such that the default Date constructor works query = replaceQueryStringAsNeeded(query); message.put(Message.QUERY_STRING, query); and then return 'null' from a handler to make sure the invocation is not blocked. If you have many query parameters then you can have a UriInfo instance injected in the handler, use its getQueryParameters() which returns a map, replace an individual parameter only and build a Message.QUERY_STRING from this map. You can deal similarly with matrix or header parameters - let me know please if you need more info... Cheers, Sergey On Wed, Jan 12, 2011 at 8:54 PM, Sisyphus <[email protected]> wrote: > > Hi Sergey, > > I am wondering if there are any other elegant ways of managing a Date > parameter given that the ParameterHandler does not currently work for this > data type. > > The project I am working on currently uses String as the input type and > then > converts internally, but this is not an ideal solution. Neither is > creating > our own wrapper data type. > > Look forward to your comments. > > Thanks, Ian > > -- > View this message in context: > http://cxf.547215.n5.nabble.com/ParameterHandler-not-invoked-for-Date-parameter-tp3322606p3338853.html > Sent from the cxf-user mailing list archive at Nabble.com. >
