Linked Questions

Popular Questions

With jaxb I want to generate pojos from xsd. But the xsd is provided by external vendor, where element have meaninful names, but types are weird. Just an example:

<xs:element name="PersonAddress" type="PerAdr" />

<xs:complexType name="PerAdr">
        <xs:element name="street" type="xs:string" minOccurs="1" maxOccurs="unbounded" />
        <xs:element name="house" type="xs:string" minOccurs="1" maxOccurs="unbounded" />

So generated class is called PerAdr. How to make it generating classes where their names are element names, not type so it would generate in this case class PersonAddress.

I have a huge xsd, so thinking about a clever way of doing it, not just writing hundreds of lines in .xjb file

Related Questions