title: JAXB xsd:include and separate packages
body: <p>I have the following situation:</p>
  
  <p>There are 2 xsd files. The 1st one defines a root element, and several types.</p>
  
  <p>The second one includes the first, and extends one of the types. There
  is no root type defined in this file.</p>
  
  <p>From the first xsd, a model is generated in a package (a).
  The second schema should create a new package (b) for the additional
  types, but reuse the generated package a. I solved this by using a
  binding file which points to the previously generated elements (in
  package a).
  So far this works, but..</p>
  
  <p>JAXB generates a ObjectFactory in package A, which contains a create
  method for the root element.
  For the second schema, also an ObjectFactory is created in package B.
  And this class also had the create method for the same root element.</p>
  
  <p>To be able to use all types, the jaxb context is created using
  multiple object factories (<code>newInstance(a.ObjectFactory.class, b.ObjectFactory.class)</code>).</p>
  
  <p>At runtime this results in the following error:</p>
  
  <blockquote>
    <p>com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2
    counts of IllegalAnnotationExceptions
    The element name {http://www.example.org/Scenario/}scenario has more
    than one mapping</p>
  </blockquote>
  
  <p>Should I generate the packages differently? Or is there something
  possible using the binding file to prevent the object factory from
  having duplicate methods?</p>