• Post Reply Bookmark Topic Watch Topic
  • New Topic

ArrayOfType Problem

 
Rahul Ravikumar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use CXF and Metro which are implementation of JAX-WS and use the JAXB framework for binding. I my WDSL i have defined a number of complex types that are "ArrayOf<Types>". For e.g.

<xs:complexType name="ArrayOfString">
<xs:annotation>
<xs:appinfo>
<jaxb roperty collectionType="indexed"/>
</xs:appinfo>
<xs ocumentation>An object for holding a String array.</xs ocumentation>
</xs:annotation>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="String" type="xs:string" />
</xs:sequence>
</xs:complexType>

In Axis 1.4, this "ArrayOfString" type gets mapped to String []. However when i use CXF/Metro it generates an ArrayOfString class that consists of a member List<String> accessible through getter/setter methods.

I would however like to map ArrayOfTypes to Type [] or List<Type>. I read some of the documentation and it was suggested that i use the <jaxb roperty collectionType="indexed"/> when defining the complex type. But this does NOT help. The WSDL2Java still generates a ArrayOfType class.

Can someone please help me out?
 
Deena Jeyachandran
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ArrayOfType class might have a getter method to get the ArrayObject. Please check
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!