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 TriggerHappy <ki...@yahoo.com> on 2007/03/26 16:15:41 UTC

invoke method - Class cast error

I've coded some very basic webservices which take and return types which have
been wraped in classes (i.e. int -> Integer, double -> Double).  I
understand that these class types are automatically supported under Axis'
SimpleDeserializer.

I am invoking a service using:
Integer result = (Integer) method.invoke( new Object[] { new Integer(5), new
Integer(10) } );
(which is calling a "public Integer addNumbers(Integer num1, Integer num2)"
signature).

However, axis produces a  java.lang.ClassCastException: java.lang.String 
error which has puzzled me since a String wasn't even involved in the
service!

Interestingly the generated WSDL has turned the Integer wrapper classes into
xsd:int types in the XML. Is this part of the SimpleDeserializer in action?

Am I using the invoke method incorrectly, or does it not properly take
simple types in an Axis service?

Thanks in advance for any help you might have on this,
William
-- 
View this message in context: http://www.nabble.com/invoke-method---Class-cast-error-tf3467264.html#a9674119
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org