Hi Sergey, Thanks for replying so quickly!
It seems to do the same with List<Long> - my ParameterHandler is never called. I'm using CXF 2.2.6. If you need any additional detail, I can email you off list so I'm not putting large chunks of code on the mailing list. Thanks much, Rob Sergey Beryozkin-5 wrote: > > Hi Rob > > Perhaps there's a big in ProviderFactory to do with finding > ParameterHandler > parameterized with array classes like Long[]...I'll look into it, in > meantime you might want to try List<Long> instead... > > cheers, Sergey > > On Mon, Mar 8, 2010 at 7:47 PM, Robert Roland <[email protected]> > wrote: > >> >> Hi all, >> >> I'm attempting to make my service accept a URL like: >> >> /getEffectiveBid?offerIds=1;2;3;4 >> >> I know that I can use a Long[] for a URL like: >> >> /getEffectiveBid?offerIds=1&offerIds=2&offerIds=3 >> >> However - this URL format is not acceptable. I want to support a >> semicolon >> delimited list. >> >> I've tried registering a ParameterHandler: >> >> <jaxrs:providers> >> <bean >> class="com.shopzilla.ms.bidding.service.util.LongArrayParameterHandler"/> >> </jaxrs:providers> >> >> My method looks like this: >> >> @Override >> @Path("getEffectiveBid") >> @Produces( { MediaType.APPLICATION_XML, "application/fastinfoset", >> MediaType.APPLICATION_JSON }) >> @GET >> public GetEffectiveBidResponse getEffectiveBid(@QueryParam("offerIds") >> Long[] offerIds) throws Exception { >> >> My ParameterHandler is never called, and I get the following error: >> >> Mar 8, 2010 11:45:29 AM org.apache.cxf.jaxrs.utils.InjectionUtils >> handleParameter >> SEVERE: Class java.lang.Long can not be instantiated using a constructor >> with a single String argument >> >> How do I do this? I've tried looking at the mailing lists, but it seems >> everyone gives up and uses a String parameter, which just seems... dirty. >> :) >> >> Thanks much for your help, >> >> Rob >> -- >> View this message in context: >> http://old.nabble.com/ParameterHandler-for-a-Long-array-tp27826543p27826543.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://old.nabble.com/ParameterHandler-for-a-Long-array-tp27826543p27828936.html Sent from the cxf-user mailing list archive at Nabble.com.
