Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.0.2
-
Fix Version/s: 1.0.3
-
Component/s: XML code generator
-
Labels:None
-
Environment:Java 5, NoArch
-
Number of attachments :
Description
The Castor SourceGenerator is generating invalid class names (the name of the element instead of the complexType) for named complexType elements having an unbounded choice content model. This results in a compile time error, since the complexType class cannot be resolved.
The source code is generated using defaultBindingType="type". This behavior appears in some generated files and not in others. If the unbounded choice is made as a singleton (i.e. maxOccurs="1"), then the problem seems to go away.
An example which illustrates this problem is attached. In this example TopographyType is referenced by both MnmType.java and TeaType.java as a member _foo. In MnmType the member is defined as class TopographyType and in TeaType it is defined as class Foo, which is unexpected and results in a compilation error.
This issue appears in Castor 1.0.2 as well.