At the moment PathParams are assumed to be Strings. It's worth noting that until now the contributions to CXF JAX-RS were focused on making it more functional, that is, for 80% of typical cases to work. For ex, as far as PathParams are concerned, the spec mandates that if a class (like Long) has valueOf(String) then this method need to be used (or if it has a constructor accepting String). We basically ignored things like that until now as the lack of support for such things would not be a blocker and focused on making sure that Uri Templating works, subresources work, etc. For ex, a simple workaround would be to have String as a type of the path param and then do Long.valueOf in the code.
At this stage of its lifecycle, CXf JAXRS needs a bit of polishing (for ex, superclasses are not currently checked for @Path, Request impl does not support IfModifiedSince and Variants, UriBuilderImpl is not complete). I'm going to update the documentation and list few tasks which I would encourage CXF JAX-RS users to consider taking on to help to push CXF JAXRS implementation further. As I promised earlier I'll have a look at at a proxy issue soon (possibly these weekends), and I will probably fix this problem as well, as it's a really simple one to deal with... Cheers, Sergey > > > When I try to map @PathParam to a Long, I get this exception - > java.lang.IllegalArgumentException: argument type mismatch. > > Am I missing something? How can I use Long instead of String for @PathParam? > > Cheers > Chico > -- > View this message in context: > http://www.nabble.com/How-can-I-use-Long-instead-of-String-for-%40PathParam--tp16488180p16488180.html > Sent from the cxf-dev mailing list archive at Nabble.com. ---------------------------- IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
