Hi,
I am trying to use a binding file to resolve a name conflict I am
getting when generating source for a particular schema. My
schema/binding-file details are below.
My problem is that in the generated class "AnotherComplexTypeExtention",
I should have a member variable called "name2" of type Boolean. No
variable gets generated for the class
"AnotherComplexTypeExtention". Please check the binding-file syntax
below. Am I using the right syntax in the binding file to resolve the
name conflict or is this a bug in Castor? I am
using Castor ver. 1.2.
<complexType name="anotherComplexType">
<sequence>
<element name="simpleResComplexType"
type="ez5120:complexComplexType"/>
<element name="name" type="string"/>
</sequence>
<attribute name="elementName" type="string"/>
</complexType>
<complexType name="AnotherComplexTypeExtention">
<complexContent>
<extension base="ez5120:anotherComplexType">
<sequence>
<!-- Refers to the name element in schema fragment shown below from
another schema -->
<element
ref="mm:name"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- Declared in another schema with a different namespace -->
<xs:element name="name" type="xs:boolean">
</xs:element>
My binding-file looks as below:
<cbf:complexTypeBinding name="/complexType:AnotherComplexTypeExtention">
<cbf:java-class name="AnotherComplexTypeExtention"/>
<cbf:elementBinding name="/name">
<cbf:member name="name2"/>
</cbf:elementBinding>
</cbf:complexTypeBinding>
Any help is greatly appreciated!
Thanks,
Michael