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=1&index=2&index=3 and I was trying to achieve this kind of request

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=1&index=2&index=3 and I was trying to achieve this kind of request (more human/tester friendly) http://localhost:8080/testMyRest/

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 P

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 wrote: > Hi > > When we have List, it is the runtime that manages the > instantiation of List and it would look for ParameterHandler >

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-03 Thread Sergey Beryozkin
Hi When we have List, it is the runtime that manages the instantiation of List and it would look for ParameterHandler 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 exception, ex, Date(

Re: Marshalling REST Query Parameter directly into Integer Array

2011-10-02 Thread Kiren Pillay
Hi Sergey, Apologies, I didn't test my app correctly. It looks like the ParameterHandler isn't working as it should. When I use a parameter of 1 for example, then it works. If I use a comma-separated list ("1,2,3") it fails saying: "02 Oct 2011 7:19:18 PM org.apache.cxf.jaxrs.utils.InjectionUtils

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-30 Thread Kiren Pillay
Hi Sergery, List works well, thanks for your help:) Moved to 2.4.2 also. Regards Kiren On Thu, Sep 29, 2011 at 2:33 PM, Sergey Beryozkin wrote: > Hi > > There was a minor issue to do with handling arrays such as Integer[], but I > can see no problems with List. I committed a test involving > L

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 List. I committed a test involving List & Integer[]. Not sure why you see a problem with List Can you try 2.4.2 please ? Sergey On 28/09/11 17:34, Kiren Pillay wrote: Hi Sergey! Tried int

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-28 Thread Kiren Pillay
Hi Sergey! Tried int[], got the same error. [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 List but that

Re: Marshalling REST Query Parameter directly into Integer Array

2011-09-28 Thread Sergey Beryozkin
Hi List 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 an Integ

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") Intege