Hi,

I have the following code in my Jax-RS application based on OpenEJB.

@GET
    public List<TxnDetails>
getTransactionDetails(@QueryParam("transactionId")List<String> id){
        ....Some more code...
        return txnDetails;
    }


>From my rest client I am trying to send the folowing query to the above GET
method

http://localhost:4099/OpenEjbSample/batchorders?transactionId=2&transactionId=3&transactionId=4

Even I tried the following as well
 List<String> ab = new ArrayList<String>();
        ab.add("3");
        ab.add("4");
        ab.add("5");
        org.apache.cxf.jaxrs.client.WebClient cl = WebClient.create("
http://localhost:4099/OpenEjbSample/batchorders";);
        cl.query("transactionId", ab);
        Object entity = cl.get().getEntity();

However this is not working and at the end I get only 4 in my GET method.
Can someone give any pointers where am I doing wrong?


If I use Long instead of String then I get the following exception:
Caused by: java.lang.NumberFormatException: For input string: "[3, 4, 5]"


Please let me know if my URL construction is completly wrong or do I need
to add any extra parameters or settings in my Rest server.


-- 
Thanks and Regards
N Radhakrishna Kalyan

P:  +46 733 312 584
http://about.me/nrkkalyan
<http://about.me/nrkkalyan>

Reply via email to