• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ArrayOfType Problem

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ArrayOfType class might have a getter method to get the ArrayObject. Please check
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic