As Benson mentioned, seeing the whole wsdl would be a help.

What CXF is doing it completely per JAXB specifications. Thus, it's behavior is "correct".

The "indexed" jaxb extension changes the way the getter/setter methods are generated on the beans. Instead of just a "List<..> getFoo()" method, it would generate get(int idx), set(int idx, object o), etc.... methods to allow indexed style behavior. It would NOT change this situation as the ArrayOfString bean would still be created, just the methods to access the list are changed.


The "proper" schema way to do this is to promote the maxOccurs unbounded and the type up to the place to where you are referring to the ArrayOfString type. Seeing the full wsdl would be a big help for this.

Dan



On May 23, 2008, at 6:54 PM, Rahul_Ravikumar wrote:


I am trying to use CXF which is an 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 it generates an ArrayOfString class that consists of a member
List<String> accessible through getter 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?
--
View this message in context: 
http://www.nabble.com/Array-Of-Unbound-Types-tp17442311p17442311.html
Sent from the cxf-user mailing list archive at Nabble.com.


---
Daniel Kulp
[EMAIL PROTECTED]
http://www.dankulp.com/blog




Reply via email to