Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-04 Thread Kiren Pillay
Thanks Sergei, I was on the wrong track, but thanks to your testcase I can see now that I should pass in array variables as: http://localhost:8080/testMyRest/time?index=1index=2index=3 and I was trying to achieve this kind of request (more human/tester friendly)

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-04 Thread Sergey Beryozkin
See comments inline On 04/10/11 09:33, Kiren Pillay wrote: Thanks Sergei, I was on the wrong track, but thanks to your testcase I can see now that I should pass in array variables as: http://localhost:8080/testMyRest/time?index=1index=2index=3 and I was trying to achieve this kind of request

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-03 Thread Sergey Beryozkin
Hi When we have ListSomeType, it is the runtime that manages the instantiation of List and it would look for ParameterHandlerSomeType only if SomeType does not have a suitable constructor or factory method. It will also be checked as a last resort if SomeType(String) constructor throws an

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-03 Thread Kiren Pillay
Okay, can you send me the name of a test case in the code where I can see how this works please? Regards Kiren On Mon, Oct 3, 2011 at 10:35 AM, Sergey Beryozkin sberyoz...@gmail.com wrote: Hi When we have ListSomeType, it is the runtime that manages the instantiation of List and it would

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-03 Thread Sergey Beryozkin
That works exactly the way I described :-), but you can easily double-check it by havubg a breakpoint in org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter and you can see what happens by running most of JAXRSUtilsTest, testCustomerParameter is one of them Sergey On 03/10/11 15:25, Kiren

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-29 Thread Sergey Beryozkin
Hi There was a minor issue to do with handling arrays such as Integer[], but I can see no problems with ListInteger. I committed a test involving ListInteger Integer[]. Not sure why you see a problem with ListInteger Can you try 2.4.2 please ? Sergey On 28/09/11 17:34, Kiren Pillay wrote:

Marshalling REST Query Parameter directly into Integer Array

2011-09-28 Thread Kiren Pillay
Hi This is an old problem, but I can't seem to find a solution posted anywhere. I want to marshall a comma-separated list of integers directly into an Integer []. 1. Service: public Response getCounters( @QueryParam(msisdn) Long msisdn, @QueryParam(counters) Integer

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-28 Thread Sergey Beryozkin
Hi ListInteger must be supported, I'll add a test for Integer[], have you tried int[] ? Cheers, Sergey On 28/09/11 15:42, Kiren Pillay wrote: Hi This is an old problem, but I can't seem to find a solution posted anywhere. I want to marshall a comma-separated list of integers directly into

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-28 Thread Kiren Pillay
Hi Sergey! Tried int[], got the same error. detail[I cannot be cast to [Ljava.lang.Object; org.apache.cxf.jaxrs.utils.InjectionUtils.addToCollectionValues(InjectionUtils.java:752) org.apache.cxf.jaxrs.utils.InjectionUtils.injectIntoCollectionOrArray(InjectionUtils.java:740) I also tried