Hi there.
I can't figure out how to get my a simple Axis2 v1.5 POJO web service to work (
Tomcat 6).
Included is some simplified code below to see the "nested classes" - they are not internal classes.
I'm not returning an Object anywhere, the Classes are defined. I initially had List members
instead of using arrays thinking that may have been the problem - didn't make a difference.
Is Axis2 just incapable of returning a class object that has a member that is an array of another class type?
I know that WSDL first is preferred but that learning curve is a bit too steep at the moment.
Any help is appreciated.
public class MyWebService {
public getMyData (
String filter) {
/* This one doesn't work. Looking at the wsdl, the response is a generated defined type
<xs:element minOccurs="0" name="return" nillable="true" type="ax24:MyData"/>
However, the wsdl doesn't define the MyData type properly.
xs:complexType name="MyData">
<xs:sequence>
<xs:element minOccurs="0" name="areagroup" nillable="true" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
*/
MyData result;
blah, blah....
return result;
}
public PointDef[] getPointDef(String filter) {
// This works. The wsdl has the complexType defined correctly for the PointDef class type.
PointDef[] result;
blah, blah....
return result
}
public Areagroup[] (String filter) {
/* This one doesn't work either. The wsdl defines the Areagroup type, but once again the array
of Area classes ends up as xs:anyType. Though the Precision class type ends up being defined properly.
*/
MyData result;
blah, blah....
return result.aryAreagroup;
}
}
public class MyData {
protected Areagroup[] aryAreagroup;
}
public class Areagroup {
protected int areagroupId;
protected String areagroupName;
protected Precision precision;
protected Area[] aryArea;
}
public class Precision {
protected int precisionCd;
protected String precisionDesc;
}
public class Area {
protected int areaId;
protected String areaName;
protected PointDef[] aryPointDef;
}
public class PointDef {
protected int ordinal;
protected double latitude;
protected double longitude;
}