Hi all I am struggling with a simple JAXB customization issue. I have an schema like this. (its actually a snippet of Bing Maps Web Services schema)
<xs:complexType name="GeocodeOptions">
<xs:sequence>
<xs:element minOccurs="0" name="Count" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="Filters" nillable="true" type="ArrayOfFilterBase" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="ArrayOfFilterBase">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="FilterBase" nillable="true" type="FilterBase" />
</xs:sequence>
</xs:complexType>
Now when I generate java classes using wsimport, it creates code structure like:
public class GeocodeOptions implements Serializable {
...
public ArrayOfFilterBase getFilters() {
...
}
public void setFilters(ArrayOfFilterBase value) {
...
}
}
public class ArrayOfFilterBase implements Serializable {
...
public List<FilterBase> getFilterBaseList() {
...
}
}
As you notice ArrayOfFilterBase is a container class which I would like to omit. I would like to have the getFilterBaseList() method directly inside GeocodeOptions class.
Is it possible to do it through JAXB customization? I searched hard for it but could not find a solution.
Thanks for your help.
Regards Nabeel Mukhtar