Call.invoke returns type Object. You need to cast that into the Integer
class and use intValue() to get the value into the primitive type int.
Something like this:
int a = (new Integer((String)call.invoke(new Object[]{}))).intValue();
-----Original Message-----
From: Dacheng [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 10:45 AM
To: [EMAIL PROTECTED]
Subject: How to get the int returned from the service
Hi, I am new in AXIS. I tried to invoke a service which would return a int
back. But when I tried to use 'int a= (int)call.invoke(new Object[]{})' to
get the result. the complier told me int is not an object. So could anyone
tell me what I should do?
Thank you in advance.
Dacheng