Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAXB is not generating the setter method for my tag

843834Jun 14 2005 — edited Nov 15 2005
Hi,
I am generating java classes form my .xsd file using JAXB.

The xsd definition has defnes a Form as a sequence of FormElement, where FormElement is a choice of graphical components like text etc. Form can have 0 or unbounded elements of typeFormElement

Example
<xs:element ref="sswfm:FormElement" minOccurs="0" maxOccurs="unbounded"/>

It is creating the getter method for this tag like this-
java.util.List getFormElement();
but does not create setter method, namely, setFormElements which I would like to use when marshalling from swing to XML.
If i remove the maxOccurs="unbounded, it is creating the setter method for this tag.But i want to keep this tag as it it and needs the setter method also.
What should i do? Has one tried this before. HELP if you can

Thank you in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 13 2005
Added on Jun 14 2005
3 comments
2,743 views