I am trying to create a web service client that accepts as operation input parameter an array of int. My code is

Service service = new Service();
Call call = (Call) service.createCall();

call.registerTypeMapping(ArrayList.class, XMLType.SOAP_ARRAY, new ArraySerializerFactory(), new ArrayDeserializerFactory());

call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName( "sortArray" );
call.addParameter("x", XMLType.SOAP_ARRAY, ParameterMode.IN);

call.setReturnType(XMLType.XSD_STRING);
ArrayList res = new ArrayList();
int x[] = {23,2,5,15,24};
for(int i=0;ix.length;i++) {
res.add(new Integer(x));
}

String ret = (String) call.invoke( new Object [] { res });

I am getting the error

java.lang.Exception: convert problem class java.util.ArrayList class [I


can anyone help?