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 Oren Bar-El <Or...@smarteam.com> on 2002/06/26 09:38:23 UTC

Return a primitive type when java.lang.Object is expected

Hi All,

I am new with Axis, and trying to evaluate it for my company.

The first test I made was to build a Microsoft.NET web service, and try to consume it with Apache Axis.
The web service has one method that returns an object. 
When the actual returned type is String, it works fine, but when I try to return a primitive type (like int or boolean), I get an Exception ("org.xml.sax.SAXException: Bad types (int ->class java.lang.Object)").
I saw that Call.invoke has a overloaded method that accepts and returns a SOAPEnvelope, but I don't really like to build my own SOAPEnvelope.

I tried this with and without WSDL2Java proxies, and got the same error.

Anybody has a solution ?

Thanks,
Oren.