JAXB:组类型问题

JAXB:组类型问题,jaxb,saxparseexception,Jaxb,Saxparseexception,我使用JAXB从XSD生成Java类,JAXB无法从包含的XSD中识别group元素,简单元素可以正常工作。错误:org.xml.sax.SAXParseException:未定义的简单或复杂类型 <?xml version="1.0" encoding="UTF-8"?> <!-- Schema for itinerary response --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

我使用JAXB从XSD生成Java类,JAXB无法从包含的XSD中识别group元素,简单元素可以正常工作。错误:org.xml.sax.SAXParseException:未定义的简单或复杂类型

    <?xml version="1.0" encoding="UTF-8"?>
<!-- Schema for itinerary response -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.cleartrip.com/air/" xmlns:air="http://www.cleartrip.com/air/">
  <xs:include schemaLocation="air-common.xsd"/>

   ***<xs:element name="itinerary" type="air:TripType"/>***
</xs:schema>

******

air-common.xsd

    <?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
 elementFormDefault="qualified" 
 targetNamespace="http://www.cleartrip.com/air/" 
 xmlns:air="http://www.cleartrip.com/air/">
  <xs:simpleType name="NameType">
    <xs:annotation>
      <xs:documentation>Defining a type for a name</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="27"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AirportCodeType">
    <xs:annotation>
      <xs:documentation>Airport codes</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z0-9]{3}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PhoneNumberType">
    <xs:annotation>
      <xs:documentation>Phone numbers</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="50"/>
    </xs:restriction>
  </xs:simpleType>
  ***<xs:group name="TripType">
    <xs:annotation>
      <xs:documentation>Trip type -- used to display an itinerary or trip</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" ref="air:trip-id"/>
      <xs:element minOccurs="0" ref="air:created-at"/>
      <xs:element ref="air:pricing-summary"/>
      <xs:element ref="air:flights"/>
      <xs:element ref="air:pax-pricing-info-list"/>
      <xs:element ref="air:pax-info-list"/>
      <xs:element ref="air:contact-detail"/>
      <xs:group minOccurs="0" ref="air:PaymentDetailResponse"/>
      <xs:element minOccurs="0" ref="air:ancillary-data"/>
    </xs:sequence>
  </xs:group>***
</xs:schema>

定义名称的类型
机场代码
电话号码
***
行程类型——用于显示行程或行程
***
代码生成在所有简单类型下都可以正常工作,问题只存在于xs:group name=“TripType”,可能是什么问题