Jaxb xjc未为<;生成相应的类成员;xsd:any>;

Jaxb xjc未为<;生成相应的类成员;xsd:any>;,jaxb,xjc,Jaxb,Xjc,以下是我正在使用的模式部分: <xsd:complexType name="ContentType" mixed="true"> <xsd:annotation> <xsd:documentation><![CDATA[ The content type is a broad base type allowing any content. ]]></xsd:docume

以下是我正在使用的模式部分:

<xsd:complexType name="ContentType" mixed="true">
      <xsd:annotation>
         <xsd:documentation><![CDATA[ 
            The content type is a broad base type allowing any content.
         ]]></xsd:documentation>
      </xsd:annotation>
      <xsd:complexContent>
         <xsd:extension base="BaseContentType">
            <xsd:sequence>
               <xsd:any minOccurs="0" maxOccurs="unbounded" namespace="##any" processContents="lax"
               />
            </xsd:sequence>
            <xsd:attribute name="orientation" type="OrientationEnum" use="optional"
               default="portrait">
               <xsd:annotation>
                  <xsd:documentation><![CDATA[
                  The @orientation attribute is used to specify a "landscape" 
                  orientation for the published form. This is primarily used
                  for schedules or for tables.                  
                  ]]></xsd:documentation>
               </xsd:annotation>
            </xsd:attribute>
         </xsd:extension>
      </xsd:complexContent>
   </xsd:complexType>

我做错了什么?

您检查过BaseContentType吗?:)对BaseContentType也没有。我最终手工修改了生成的
BaseContentType
类,并在
content
成员变量中添加了
@XmlAnyElement
@XmlMixed
注释。
<jxb:bindings xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
    version="2.1">

    <jxb:bindings schemaLocation="../xsd/USLM-1.0.xsd">
        <jxb:bindings
            node="//xsd:group[@name='NoteStructure']">
            <jxb:property name="NoteStructure3" />
        </jxb:bindings>
    </jxb:bindings>


</jxb:bindings>
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContentType")
@XmlSeeAlso({
    HeadingType.class,
    NoteType.class,
    QuotedContentType.class,
    ColumnType.class,
    PType.class
})
public class ContentType
    extends BaseContentType
{

    @XmlAttribute(name = "orientation")
    protected OrientationEnum orientation;

    /**
     * Gets the value of the orientation property.
     * 
     * @return
     *     possible object is
     *     {@link OrientationEnum }
     *     
     */
    public OrientationEnum getOrientation() {
        if (orientation == null) {
            return OrientationEnum.PORTRAIT;
        } else {
            return orientation;
        }
    }

    /**
     * Sets the value of the orientation property.
     * 
     * @param value
     *     allowed object is
     *     {@link OrientationEnum }
     *     
     */
    public void setOrientation(OrientationEnum value) {
        this.orientation = value;
    }

}