Hi,
I upgraded from 0.9.4.* to the 0.9.5.2 and I have a few questions about
the
generated classes:
1) ${GeneratedBean}.unmarshal(...) used to return ${GeneratedBean} but
now
it returns java.lang.Object.
What is the reason behind this change?
2) I have imported schema files containing enumerations. Something like
this:
Int type:
<xsd:simpleType name="IntCode">
<xsd:restriction base="xsd:nonNegativeInteger">
<xsd:enumeration value="0"/>
<xsd:enumeration value="6002"/>
<xsd:enumeration value="6033"/>
String type:
<xsd:simpleType name="StringCode">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="5Ton"/>
<xsd:enumeration value="30ATug"/>
<xsd:enumeration value="ACU20M"/>
If I include the schema files containing these enumerations, the
generated code will be something like:
// Not type-safe, uses int.
public int getIntCode()
// Type-safe, uses class (string restriction)
public StringCode getStringCode()
Generated from something like this:
<xsd:complexType name="ImportingType">
<xsd:attribute name="intCode" type="imported:IntCode"
use="required"/>
<xsd:attribute name="stringCode" type="otherImported:StringCode"
use="required"/>
</xsd:complexType>
So my question is, why is the generated code type safe for simpleType-s
based on string-s but not for int-s?
Is there a quick explanation or workaround for this behavior, or is this
a bug?
Should I send a test case?
Gergely
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev