title: org.xml.sax.SAXParseException: 'GovernmentIDType' is already defined
body: <p>I a trying to generate Java classes from XSDs provided by third party. However I am getting the error as</p>
  <blockquote>
  <p>[ERROR]
  file:/Users/sanket/eblock/code/eblock-graphql/eblock-integration/autotec-auction-access-sqs/src/main/resources/xsd/COMP9.xsd[243,16]
  org.xml.sax.SAXParseException: 'GovernmentIDType' is already defined</p>
  </blockquote>
  <p>I am getting same errors for other elements too. I tried adding unique namespace to XSDs but that didn't work. The definition of this particular element 'GovernmentIDType', is different in both XSDs but name is similar.</p>
  <p>COMP9.xsd</p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by Charles Redden (AutoTec, LLC) --&gt;
  &lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; elementFormDefault=&quot;qualified&quot;&gt;
          &lt;xs:include schemaLocation=&quot;Header9.xsd&quot;/&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Company Message&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:element name=&quot;BondingCompany&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Name of bonding company.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;75&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;BondExpirationDate&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Expiration date of bond.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;BondNumber&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Bond number as it appears on bond.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;BusinessStartDate&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Date company came into business.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;CommercialAccountType&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Type of commercial account.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;Bank / Credit Union&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Financial Services Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Insurance Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Manufacturer&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Rental Car Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Captive Finance Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Fleet Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Government Agency&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Salvage/Scrap Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Other Business Organization&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Auction&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Non-Profit Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Public&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Title Loan Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Subprime Finance Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Transporter&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;CompanyID&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;AutoTec Company ID&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:int&quot;&gt;
                      &lt;xs:maxInclusive value=&quot;8999999&quot;/&gt;
                      &lt;xs:minInclusive value=&quot;5000000&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;CompanyInformation&quot;&gt;
              &lt;xs:complexType&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element ref=&quot;CompanyID&quot;/&gt;
                      &lt;xs:element ref=&quot;DBAName&quot;/&gt;
                      &lt;xs:element ref=&quot;LegalName&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;CompanyType&quot;/&gt;
                      &lt;xs:element ref=&quot;GovernmentID&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;GovernmentIDType&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;GovernmentIDCountry&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;EntityType&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;PublicSaleOnly&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;NICBNumber&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;DunandBradstreetNumber&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;InsuranceCompany&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;PolicyNumber&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;InsuranceExpirationDate&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;BondingCompany&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;BondNumber&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;BondExpirationDate&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;RIN&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;GST&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;BusinessStartDate&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;OutOfBusiness&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;OutOfBusinessDate&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;MembershipExpirationDate&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;CommercialAccountType&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;ParentCompanyID&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;Courier&quot; minOccurs=&quot;0&quot;/&gt;
                      &lt;xs:element ref=&quot;CourierAccount&quot; minOccurs=&quot;0&quot;/&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;CompanyType&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Indicates company's tax classification.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;Sole Proprietorship&quot;/&gt;
                      &lt;xs:enumeration value=&quot;General Partnership&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Limited Partnership&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Sub C Corporation&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Sub S Corporation&quot;/&gt;
                      &lt;xs:enumeration value=&quot;LLC-Sole&quot;/&gt;
                      &lt;xs:enumeration value=&quot;LLC-Partnership&quot;/&gt;
                      &lt;xs:enumeration value=&quot;LLC-Corporation&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Business Corporation&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Limited Liability Company&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Unlimited Liability Corporation&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Government Agency&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Unknown&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;Courier&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Type of courier.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;No Courier&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Federal Express&quot;/&gt;
                      &lt;xs:enumeration value=&quot;DHL&quot;/&gt;
                      &lt;xs:enumeration value=&quot;United Parcel Service&quot;/&gt;
                      &lt;xs:enumeration value=&quot;United States Postal Service&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Purolator&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Other&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;CourierAccount&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Courier Account number and information.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;25&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;DBAName&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Company's Doing Business As name.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;DunandBradstreetNumber&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;ID issued to company by Dun and Bradstreet&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;9&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;EntityType&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Indicates kind of entity in message.  Note: The EntityType enumerations are consistent across all messages. The only values that pertain to this message are: Dealership and Commercial Account.  Transporter is a future enhancement and may or may not be relevant to this message in the future.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;Dealership&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Transporter&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Commercial Account&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Company Association&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Person&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Bank&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Bank Account&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Third Party Remarketing&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Customer Customization&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;GovernmentID&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Unique id issued by government.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                      &lt;xs:minLength value=&quot;1&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;GovernmentIDCountry&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Issuing country of government id&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;GovernmentIDType&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Indicates type of government id.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;GovtPersonalID&quot;/&gt;
                      &lt;xs:enumeration value=&quot;GovtID&quot;/&gt;
                      &lt;xs:enumeration value=&quot;Passport&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;GST&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Goods and Services Tax number issued for Canadian companies.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                              &lt;xs:pattern value=&quot;[0-9]{9}&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;InsuranceCompany&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Insurance company.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;75&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;InsuranceExpirationDate&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Expiration date of insurance policy.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;LegalName&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Legal Name of company based on licensing documents.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;MembershipExpirationDate&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Expiration date for company's AutoTec membership.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;Message&quot;&gt;
              &lt;xs:complexType&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element ref=&quot;Header&quot;/&gt;
                      &lt;xs:element ref=&quot;CompanyInformation&quot;/&gt;
                  &lt;/xs:sequence&gt;
              &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;NICBNumber&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;ID issued to company by National Insurance Crime Bureau.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;9&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;OutOfBusiness&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Indicates whether a company is out of business.  A 'Y' value will always be accompanied by an OutOfBusinessDate.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;Y&quot;/&gt;
                      &lt;xs:enumeration value=&quot;N&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;OutOfBusinessDate&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Date company went out of business.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;ParentCompanyID&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;The AutoTec id of any group of which the company is a member.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:int&quot;&gt;
                      &lt;xs:maxInclusive value=&quot;1200000000&quot;/&gt;
                      &lt;xs:minInclusive value=&quot;1000000&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;PolicyNumber&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Insurance policy number.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:maxLength value=&quot;50&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;PublicSaleOnly&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Indicates company is allowed to purchase in public sales only.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                      &lt;xs:enumeration value=&quot;Y&quot;/&gt;
                      &lt;xs:enumeration value=&quot;N&quot;/&gt;
                  &lt;/xs:restriction&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name=&quot;RIN&quot;&gt;
              &lt;xs:annotation&gt;
                  &lt;xs:documentation&gt;Registrant Identification Number issued by Canada to Ontario dealerships.&lt;/xs:documentation&gt;
              &lt;/xs:annotation&gt;
              &lt;xs:simpleType&gt;
                  &lt;xs:union&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                              &lt;xs:pattern value=&quot;[0-9]{9}&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                      &lt;xs:simpleType&gt;
                          &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                              &lt;xs:enumeration value=&quot;&quot;/&gt;
                          &lt;/xs:restriction&gt;
                      &lt;/xs:simpleType&gt;
                  &lt;/xs:union&gt;
              &lt;/xs:simpleType&gt;
          &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  <p>person.xsd</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by Charles Redden (AutoTec, LLC) --&gt;
  &lt;xs:schema elementFormDefault=&quot;qualified&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;
      &lt;xs:include schemaLocation=&quot;Header9.xsd&quot;/&gt;
      &lt;xs:annotation&gt;
          &lt;xs:documentation&gt;Person Message&lt;/xs:documentation&gt;
      &lt;/xs:annotation&gt;
      &lt;xs:element name=&quot;CardSentToLocation&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Location last card was mailed to&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;35&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;CardSequence&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Sequence Number of currently active card.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:pattern value=&quot;[0-9]{1,2}&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;DateMostRecentCard&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Date most recent card printed.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                  &lt;xs:simpleType&gt;
                      &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                          &lt;xs:enumeration value=&quot;&quot;/&gt;
                      &lt;/xs:restriction&gt;
                  &lt;/xs:simpleType&gt;
              &lt;/xs:union&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;Deceased&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Deceased status.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:enumeration value=&quot;Y&quot;/&gt;
                  &lt;xs:enumeration value=&quot;N&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;DOB&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Date of Birth.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                  &lt;xs:simpleType&gt;
                      &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                          &lt;xs:enumeration value=&quot;&quot;/&gt;
                      &lt;/xs:restriction&gt;
                  &lt;/xs:simpleType&gt;
              &lt;/xs:union&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;FirstName&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's first name.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;20&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;GovernmentID&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Unique identification issued by government.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;25&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;GovernmentIDCountry&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Issuing country of government ID.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;50&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;GovernmentIDType&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Indicates type of government id.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:enumeration value=&quot;None&quot;/&gt;
                  &lt;xs:enumeration value=&quot;Social Security Number&quot;/&gt;
                  &lt;xs:enumeration value=&quot;Taxpayer Identification Number&quot;/&gt;
                  &lt;xs:enumeration value=&quot;CURP&quot;/&gt;
                  &lt;xs:enumeration value=&quot;Passport&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;IDVerificationScore&quot; type=&quot;xs:int&quot;/&gt;
      &lt;xs:element name=&quot;LanguagePreference&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Preferred language for communication.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:enumeration value=&quot;English&quot;/&gt;
                  &lt;xs:enumeration value=&quot;Spanish&quot;/&gt;
                  &lt;xs:enumeration value=&quot;French&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;LastName&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's last name.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;30&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;MembershipExpirationDate&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;AutoTec renewal date for individual.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:union memberTypes=&quot;xs:date&quot;&gt;
                  &lt;xs:simpleType&gt;
                      &lt;xs:restriction base=&quot;xs:token&quot;&gt;
                          &lt;xs:enumeration value=&quot;&quot;/&gt;
                      &lt;/xs:restriction&gt;
                  &lt;/xs:simpleType&gt;
              &lt;/xs:union&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;Message&quot;&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element ref=&quot;Header&quot;/&gt;
                  &lt;xs:element ref=&quot;PersonInformation&quot;/&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;MiddleName&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's middle name.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;30&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;NickName&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's nickname.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;15&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;PersonID&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;AutoTec Individual ID.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:int&quot;&gt;
                  &lt;xs:minInclusive value=&quot;100000001&quot;/&gt;
                  &lt;xs:maxInclusive value=&quot;199999999&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;PersonInformation&quot;&gt;
          &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element ref=&quot;PersonID&quot;/&gt;
                  &lt;xs:element ref=&quot;FirstName&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;MiddleName&quot;/&gt;
                  &lt;xs:element ref=&quot;LastName&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;Prefix&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;Suffix&quot;/&gt;
                  &lt;xs:element ref=&quot;GovernmentID&quot;/&gt;
                  &lt;xs:element ref=&quot;GovernmentIDCountry&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;GovernmentIDType&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;DOB&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;DateMostRecentCard&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;CardSentToLocation&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;NickName&quot;/&gt;
                  &lt;xs:element ref=&quot;MembershipExpirationDate&quot;/&gt;
                  &lt;xs:element ref=&quot;Deceased&quot;/&gt;
                  &lt;xs:element ref=&quot;LanguagePreference&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;PublicSaleOnly&quot;/&gt;
                  &lt;xs:element minOccurs=&quot;0&quot; ref=&quot;IDVerificationScore&quot;/&gt;
                  &lt;xs:element ref=&quot;CardSequence&quot;/&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;Prefix&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's name prefix.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;10&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;PublicSaleOnly&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Indicates individual may only purchase at a public sale.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:enumeration value=&quot;Y&quot;/&gt;
                  &lt;xs:enumeration value=&quot;N&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
      &lt;xs:element name=&quot;Suffix&quot;&gt;
          &lt;xs:annotation&gt;
              &lt;xs:documentation&gt;Individual's name suffix.&lt;/xs:documentation&gt;
          &lt;/xs:annotation&gt;
          &lt;xs:simpleType&gt;
              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
                  &lt;xs:maxLength value=&quot;10&quot;/&gt;
              &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
      &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  <p>pom.xml</p>
  <pre><code>&lt;build&gt;
          &lt;plugins&gt;
              &lt;!-- Plugin required to build java classes from XSD using XJC --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;jaxb2-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.5&lt;/version&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;org.jvnet.jaxb2_commons&lt;/groupId&gt;
                          &lt;artifactId&gt;jaxb2-commons-lang&lt;/artifactId&gt;
                          &lt;version&gt;2.3&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;xjc&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;configuration&gt;
                      &lt;packageName&gt;com.sqs.dto&lt;/packageName&gt;
                      &lt;schemaDirectory&gt;src/main/resources/xsd&lt;/schemaDirectory&gt;
                      &lt;arguments&gt;-Xcommons-lang&lt;/arguments&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  <p>I need some solution for this.</p>
  <p>UPDATE: I tried adding Binding file as follow but still same error:
  PER.xjb</p>
  <pre><code>&lt;jaxb:bindings xmlns:jaxb=&quot;http://java.sun.com/xml/ns/jaxb&quot;
                 xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
                 version=&quot;2.1&quot;&gt;
      &lt;jaxb:bindings schemaLocation=&quot;../xsd/PER.xsd&quot;&gt;
          &lt;jaxb:bindings node=&quot;//xs:element[@name='GovernmentIDType']/xs:simpleType&quot;&gt;
              &lt;jaxb:property name=&quot;GovernmentIDTypePER&quot; /&gt;
              &lt;!--&lt;jaxb:factoryMethod name=&quot;GovernmentIDTypePER&quot;/&gt;--&gt;
          &lt;/jaxb:bindings&gt;
          &lt;jaxb:bindings node=&quot;//xs:element[@name='GovernmentID']/xs:simpleType&quot;&gt;
              &lt;jaxb:factoryMethod name=&quot;GovernmentIDPER&quot;/&gt;
              &lt;!--&lt;jaxb:property name=&quot;GovernmentIDPER&quot; /&gt;--&gt;
          &lt;/jaxb:bindings&gt;
      &lt;/jaxb:bindings&gt;
  &lt;/jaxb:bindings&gt;
  </code></pre>