> 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();

Or this....

int a = ((Integer)call.invoke(new Object[]{})).intValue();

Cheers,
Peter.

>
> -----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
>
>
>

This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 
693 481. It is confidential to the ordinary user of the email address to which 
it was addressed and may contain copyright and/or legally privileged 
information. No one else may read, print, store, copy or forward all or any of 
it or its attachments. If you receive this email in error, please return to 
sender. Thank you.

If you do not wish to receive commercial email messages from Fujitsu Australia 
Software Technology Pty Ltd, please email [EMAIL PROTECTED]


Reply via email to