If you really want the [] form instead of the collection form, JAXB does provide "customizations" that can be used when you run wsdltojava to produce what it calls "indexed" properties. I don't really remember how it's done, but grep for "indexed" in chapter 7 of the JAXB spec.
Dan On Wednesday 27 June 2007 04:17, James Mao wrote: > Hi, > > We delegate the types generation to JAXB2, > and in the generated types, they don't generate the setter for the > List types > > You can do the following in Java > > getChoice().add(new ChoiceType()) > > > James > > > Hi guys, I'm fairly new to CXF and I've got a question regarding the > > WSDL2Java tool: > > > > > > I was using this WSDL snippet: > > > > <!-- ChoiceType --> > > <complexType name="ChoiceType"> > > <sequence> > > <element name="choiceId" type="string"/> > > <element name="choice" type="string"/> > > <element name="score" type="float"/> > > </sequence> > > </complexType> > > > > <!-- ChoiceList --> > > <complexType name="ChoiceList"> > > <sequence> > > <element name="choice" type="type:ChoiceType" > > minOccurs='0' maxOccurs='unbounded'/> > > </sequence> > > </complexType> > > > > I ran the WSDL2Java tool using the maven plugin and I got both > > /ChoiceList.class/ and /ChoiceList.java/ with the /getChoice()/ > > method but the /setChoice(ChoiceType) /was missing. > > Any answers to why it was missing and some possible work around? > > > > Thanks, > > Ken -- J. Daniel Kulp Principal Engineer IONA P: 781-902-8727 C: 508-380-7194 [EMAIL PROTECTED] http://www.dankulp.com/blog
