Given this XSD:
<xsd:element name="ServiceList">
<xsd:complexType>
<xsd:sequence>
...
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ServiceList">
<xsd:sequence>
...
</xsd:sequence>
</xsd:complexType>
What is kind of the semantic difference between these two? I.e. named element
s and complexType
s which are direct children of a schema
.
The reason for me asking is that I tried doing this in an XSD:
<xsd:element name="AvailableServices" type="cm:ServiceList" />
<xsd:element name="ExistingServices" type="cm:ServiceList" />
<xsd:complexType name="ServiceList">
<xsd:sequence>
...
</xsd:sequence>
</xsd:complexType>
But when this was compiled into Java classes using the Maven JAXB plugin, I am only able to create a new ServiceList()
. AvailableServices
and ExistingServices
doesn't seem to even exist among the generated classes. So, what's going on here?