wink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gulack <>
Subject Empty List/Array with @FornParam
Date Mon, 26 Mar 2012 10:15:07 GMT

I'm using Apache Wink for implementing REST Services and I can't seem to
receive parameters of type array or List. The call is being made from ajax

    { param: ['string1', 'param2', 'x', 'etc...etc....etc'],
        str2: "str2"},

    function(data) {// do something   });

On the server side, Strings and ints are correctly received, but the
'param' parameter is always received empty (not null, but with zero
elements), whether the variable is defined as String[], List, Set, ... .
The receiving function is defined as:

@POST @Produces("application/json") @Path("eee")
public Response eee(@FormParam("str1") String str1, @FormParam("param")
String[] param, @FormParam("str2") String str2)

While debugging, I can see a context variable with a table entry like:


That translates to 'param[]=string1, param[]=param2, ..', no indexation.
Don't know if that's correct.
Any ideas ?


View raw message