In that case, it would be really useful to know which jaxb version you use and to see the relevant parts of your Xsd..
-- S pozdravom Ladislav Lenčucha [email protected] On Fri, Dec 7, 2012 at 4:04 PM, KARR, DAVID <[email protected]> wrote: > > -----Original Message----- > > From: Ladislav Lenčucha [mailto:[email protected]] > > Sent: Thursday, December 06, 2012 10:18 PM > > To: [email protected] > > Subject: Re: Why would XJC not generate a class for a root element? > > > > Is the name of the root element and its complex type the same? > > > > Xjc generates 1 class file for xsd document named after the root > > element > > and then separate file for each complexType. If the complextType name > > is > > the same as root element name, the root element file is overwritten.. > > I never do that. My type names always end with "Type". > > The base name of my schema file name is the same as the root element, and > the type of the root element has "Type" appended to the name. XJC > generated the class for the "Type", but not the root element. > > > On Fri, Dec 7, 2012 at 1:57 AM, KARR, DAVID <[email protected]> wrote: > > > > > I have a JAX-RS app that uses XJC to generate classes from 4 > > different > > > schemas. All four xjc calls in the pom reference a binding file > > specific > > > to that schema. All 4 schemas are pretty simple, along with very > > similar > > > binding files, and the reference in the pom. They all define a > > single > > > top-level "element" element, along with several complexType elements. > > > > > > For some reason, the processing of one of those schemas is refusing > > to > > > generate the class corresponding to the root element. I have a > > complexType > > > that the element references, and it generated the class for that, but > > not > > > for the element. The other three schemas get the generated class > > > corresponding to the root element. > > > > > > There are no processing errors. > > > > > > I'd like to get a solution, but is there some additional debugging I > > can > > > turn on that might give me some useful information? > > > >
