Forums Register Login

ArrayOfType Problem

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
The ArrayOfType class might have a getter method to get the ArrayObject. Please check
A "dutch baby" is not a baby. But this tiny ad is baby sized:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1381 times.
Similar Threads
namespace
[JAXB] Not able to generate IMPL file using xjc
problems enforcing the order of elements that compose a complexType
Help, gurus, XML schema question
Schema design Help
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 11:26:21.