Hello,

I have a simpletype in my XML schema:

<xs:simpleType name="ST_Typename">
  <xs:restriction base="xs:string">
        <xs:enumeration value="VALUE1" />
        <xs:enumeration value="VALUE2" />
        ...
  </xs:restriction>
</xs:simpleType>

I generate Java files using Castor Source Generator and a proper enum-like Java 
class is generated for this complexType.
Then I use other castor-generated class for storing values of this enumeration, 
and then marshall it like this:

SomeContainer c = new SomeContainer();
c.setSomeValue(ST_Typename.VALUE1);
c.setSomeStringValue("Hello world!");

FileWriter writer = null;
try {
    writer = new FileWriter("output.xml");
    response.marshal(writer);
} catch (Exception e) {
    e.printStackTrace();
}

Problem is that the field "someValue" of the type "ST_Typename" is not 
marshalled and does not exist in an XML file, however string property is 
correctly marshalled.
I am using Castor in combination with Axis2 and it is needed to serialize this 
object and deseirialize to the same type of Castor-generated class on the other 
side of the net.

Please give me an advice concerning the solution for this problem. Should I use 
some custom mapping settings?

Best regards,
Vadim

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to