I have just started work on an existing schema that has been used with Castor 0.9.3.21 and am having some difficulties moving to 0.9.4.5, in particular enumerations seem to be handled in a different way by the SourceGenerator.
If I create an integer enumeration as a simple type in one schema: <xs:schema targetNamespace="http://simptypes.eai.o2c.ibm.com" xmlns:xs=" http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.1.3"> <xs:simpleType name="type_test_type"> <xs:restriction base="xs:string"> <xs:enumeration value="1"/> <xs:enumeration value="2"/> </xs:restriction> </xs:simpleType> </xs:schema> and then attempt to use this enumeration in another schema... <xs:schema targetNamespace="http://main.eai.o2c.ibm.com" xmlns:xs=" http://www.w3.org/2001/XMLSchema" xmlns:simptypes=" http://simptypes.eai.o2c.ibm.com" xmlns:main="http://main.eai.o2c.ibm.com" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="http://simptypes.eai.o2c.ibm.com" schemaLocation=" SimpTypes.xsd"/> <xs:element name="place"> <xs:complexType> <xs:sequence> <xs:element name="Test" type="simptypes:type_test_type"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Then whilst the code generates without errors, the return type of the method getTest() in Place is an 'int' rather than 'com.ibm.o2c.eai.simptypes.type_test_type'. /** * Field _Test */ private int _test; If I alter type_test_type so it is a string enumeration rather than an integer one then the return type will be as expected. Being new to Castor I am not sure whether this is a problem with the schema, my mis-understanding enumerations or a bug. Any help would be most appreciated. Thanks, Jamie Ashford. ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
