You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Axel Burwitz <ax...@arcor.de> on 2004/10/21 14:55:21 UTC
very basic thing: array for return
Hi,
sorry for boring with a very basic question, but I cannot solve it..
want get back an int array from my web service. In the call, after some
testing , reading, trying, I have set for "setReturnType" now
"Constants.SOAP_ARRAY" (I am far from being sure...)
But when I start the call, it gets "java.lang.ClassCastException" !
Can anybody help me with a hint for the correct and appropriate definition ?
Thanks in advance,
Axel
....
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("distrowatchserverselectdb");
Integer movieid = new Integer(2);
call.addParameter("movieid",
org.apache.axis.Constants.XSD_INTEGER,
javax.xml.rpc.ParameterMode.IN);
call.setReturnType(Constants.SOAP_ARRAY);
int[] ret = (int[]) call.invoke( new Object[] {movieid});
System.out.println("Bin zur?ck");
ClientDistroWatch.dwstimmen=ret;
//
} catch (Exception e) {
System.err.println(e.toString());
}