Hi!

We want to migrate a Axis 1.4 webservice to Axis2. The webservice is generated 
from a POJO Java class which contains a method like this:

  public Object getData() {
    return "a string";
  }

The WSDL generated by Axis2 looks like this:

<xs:element name="getDataResponse">
   <xs:complexType>
     <xs:sequence>
       <xs:element minOccurs="0"
           name="return" nillable="true" type="xs:anyType"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

The client is generated from the wsdl using wsdl2java. When I test the web 
service with GetDataResponse gdr = stub.getData(); it generates the following 
exception:

org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Any type 
element type has not been given
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at package.MyServiceStub.fromOM(ZederbasicServiceStub.java:14738)

The Object returned by getData() can be a String, Integer, Boolean or Date, no 
other types. All can be serialized by Axis2.

In Axis 1.4 returning an Object was no problem. I search the mailing list but 
found no hint.

Any ideas how I can get this to work?

Thank you in advance. 


--
Boris Klug, Koblenz, [email protected], Fax: 0261-1334249

Reply via email to