Hi,
jsonwebservice tested with rpc-literal encoding. Array or ArrayList
as first level parameter not supported in rpc-literal soap
specification. Only rpc document encoding do support array encoding.
If you are not sure about what is rpc-literal and rpc-document, simple
answer to your issue is don't use array or arraylist as first level
parameter. Wrap it with object.
like bellow,
public class ArrayWrap{
private ArrayList<Integer> myArray;
public ArrayList<Integer> getMyArray(){
return myArray;
}
public void setMyArray(ArrayList<Integer> array){
this.array = myArray;
}
}
then web method like follow
@WebMethod(operationName = "methodname")
public @WebResult(name = "message") ArrayList<object>
methodname(
@WebParam(name = "arg1") double arg1,
@WebParam(name = "arg2") double arg2,
@WebParam(name = "arg3") ArrayWrap arg3)
Or even more better look of move all parameter to one class and use it
as parameter, like bellow
class MyParameter{
private double arg1;
private double arg2;
ptivate int[] arg3;
///Getter and setters
}
and web method like bellow
@WebMethod(operationName = "methodname")
public @WebResult(name = "message") ArrayList<object>
methodname(
@WebParam(name = "myargs") MyParameter myargs)
{
...
}
Regards
Sundar