I have a problem with a binding file using SourceGenerator in Castor 0.9.4.3.
I have been given a top level XSD file which looks something like this
(obviously, I've removed any confidential material, but the structure is
the same):
<xs:include schemaLocation="Widgets.xsd"/>
<xs:include schemaLocation="Thingys.xsd"/>
<xs:element name="response">
<xs:annotation>
<xs:documentation>This element encapsulates a response to a
query</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="timestamp" type="xs:datetime" />
<xs:choice>
<xs:element name="widgetresponse"
type="widgetresponsetype" />
<xs:element name="thingyresponse"
type="thingyresponsetype" />
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
As you can see, it references other XSD files for the different response
types.
A widgetresponsetype is a complex type in Widgets.xsd which contains a
child element of location. Similarly, a thingyresponsetype defined in
thingys.xsd has a child element of location.
Both widgetresponsetype and thingyresponsetype are global complex types
I want to do the following in my binding file:
<binding defaultBindingType="element">
<elementBinding name="/response/widgetresponse/location">
<java-class name="WidgetLocation"/>
</elementBinding>
<elementBinding name="/response/thingyresponse/location">
<java-class name="ThingyLocation"/>
</elementBinding>
</binding>
...so that I don't end up with the same class name.
However, this doesn't work!
What am I doing wrong. I can't get <complexTypeBinding> to work at all.
I'm beginning to wonder if the problem is that I've got an XSD spread out
over multiple files. It isn't my XSD so I can't alter it in any way.
Any help you can offer would be greatly appreciated.
Thanks,
Phil Pinel
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev