In JAXB when using automatic class generation via xjc from xsd scheme.
alpha.xsd
You can use an external binding file to indicate that during class generation we wish to use our existing class for the complex type called Document.
binding.xml
XJC Call
xjc -b binding.xml beta.xsd