It looks like jaxb2 is ignoring xsd:choice within the xsd:extension. The code generation simply ignores it, not sure why.
Any ideas?
Please advice.
XSD:
<complexType name="tFrom" mixed="true">
<complexContent>
<extension base="wpc:tFromExtension">
<sequence>
<any namespace="##other" processContents="skip" minOccurs="0"/>
<choice minOccurs="0">
<element ref="bpws:query"/>
<element ref="bpws:expression"/>
<element ref="bpws:service-ref"/>
</choice>
</sequence>
<attribute name="variable" type="NCName"/>
<attribute name="part" type="NCName"/>
<attribute name="property" type="QName"/>
<attribute name="partnerLink" type="NCName"/>
<attribute name="endpointReference" type="bpws:tRoles"/>
<attribute name="opaque" type="bpws:tBoolean"/>
</extension>
</complexContent>
</complexType>
Generated code:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "tFrom")
@XmlRootElement(name = "from")
public class TFrom
extends TFromExtension
{
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String variable;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String part;
@XmlAttribute
protected QName property;
@XmlAttribute
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String partnerLink;
@XmlAttribute
protected TRoles endpointReference;
@XmlAttribute
protected TBoolean opaque;
/**
* Gets the value of the variable property.
*
* @return
Thanks a lot