You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the simplify-plugin, all examples in the reference have choice-elements with maxOccurs="unbounded", which correctly results in List-properties. But if maxOccurs is not specified it defaults to 1, so there should not be List-properties but singular fields.
@XmlElement(name = "foo", type = String.class)
protectedStringfoo; // no List!@XmlElement(name = "bar", type = Integer.class)
protectedIntegerbar; // no List!
for usage of <simplify:as-element-property/>
The text was updated successfully, but these errors were encountered:
I'm not sure if this is the correct place to post the question but kind of looks similar to what i need. The behaviour the @ashauer needs is what i get from the default jaxb2-maven plugin.
So by not targeting the elements in my bindings.xjb file using <simplify:as-element-property/>jaxb2-maven plugin generates elements as a single object IF <xs:choice> is used and maxOccurs is 1.
But what i'm wondering is if it's possible to "override" the maxOccurs value in the child elements and if there's element with maxOccurs="1", then will be generated as a single object?
So, i still want to use <xs:choice maxOccurs="unbounded">so that i can add more elements inside of that complexType, but not all the elements should be generated as a List.
For the simplify-plugin, all examples in the reference have
choice
-elements withmaxOccurs="unbounded"
, which correctly results in List-properties. But ifmaxOccurs
is not specified it defaults to 1, so there should not be List-properties but singular fields.Example:
should rather result in
for usage of
<simplify:as-element-property/>
The text was updated successfully, but these errors were encountered: