My Sample XSD:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="customer" type="customer-type"/>
<xsd:complexType name="customer-type">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="billing-address" type="address-type"/>
<xsd:element name="shipping-address" type="address-type"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="address-type">
<xsd:sequence>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
My Sample XML:
<?xml version="1.0" encoding="utf-8"?>
<customer>
<name>str1234</name>
<billing-address>
<street>str1234</street>
<city>str1234</city>
</billing-address>
<shipping-address>
<street>str1234</street>
<city>str1234</city>
</shipping-address>
</customer>
I have generated Pojos using the JAXB wizard in Eclipse. It resulted in three classes. AddressType.java, CustomerType.java and ObjectFactory.java
However no class is generated for the element Customer.
EDIT: How to use the un-marshaller in jaxb to retrieve the values without the Customer Pojo Class.