[jboss-dev-forums] [Design of JBossXB] - Re: @XmlElementWrapper/@XmlElements
scott.stark@jboss.org
do-not-reply at jboss.com
Sat Oct 6 09:16:22 EDT 2007
I worked around this by adding support for using JBossXmlChildren with a non-collection type:
| @XmlType
| @JBossXmlChildren
| ({
| @JBossXmlChild(name="int", type=Integer.class),
| @JBossXmlChild(name="float", type=Float.class),
| })
| public class Bar
| {
| private Number value;
|
| public Number getValue()
| {
| return value;
| }
|
| public void setValue(Number value)
| {
| this.value = value;
| }
| }
|
There was a TODO for this in JBossXBNoSchemaBuilder. The restriction is that the type must have a value property to accept the child value.
The logic for the XmlElementWrapper seems incorrect for a property with XmlElements. The XmlElementWrapper Sequence should wrap the XmlElements Choice I believe?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092266#4092266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092266
More information about the jboss-dev-forums
mailing list