I am not sure if this is already addressed. When I searched I couldn't find this precise problem. Please correct me if I am wrong.
A simpletype based on xsd:string will not generate a class and will be of type java.lang.String. If a new simpletype is derived from the first using restriction and enumeration, a new class is generated but is not inherited from java.lang.String as it is not possible to.
Using these simpletypes will become impossible in a hierarchy of complextypes. The following schema sample highlights the problem. PartyRole is derived from ObjectRole. Both are simple types, but ObjectRole being just a string does not generated any class. PartyRole being enumeration generates a class. But PartyRole is derived from ObjectRole which is not clearly reflected in the java classes generated. We need simpletypes of this nature to use them in a hierachy of complex types, for e.g. Object, Party.
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:simpleType name="ObjectRole">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="PartyRole">
<xsd:restriction base="ObjectRole">
<xsd:enumeration value="Person"/>
<xsd:enumeration value="Org"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Object">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Role" type="ObjectRole"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="BaseParty">
<xsd:simpleContent>
<xsd:extension base="Object">
<xsd:attribute name="Type" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="Party">
<xsd:simpleContent>
<xsd:restriction base="BaseParty">
<xsd:attribute name="Role" type="PartyRole"/>
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
</xsd:schema>