Hi,
I am trying some external customization so that the generated
classnames match my existing classes(I am doing a jaxb migration)
I have the following XSD construct.
<xsd:element name="Smaple_Protocl">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="LocInfo"/>
<xsd:element ref="SampInfo"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
........
........
<xsd:element name="SampInfo">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="SE01"/>
<xsd:element ref="SE02"/>
</xsd:sequence>
<xsd:attribute fixed="sample info trailer" name="desc"
type="xsd:string"/>
</xsd:complexType>
</xsd:element>
Now, in a binding xjb file I have the following line:
...
<jxb:bindings node="//xsd:element[@name='SampInfo']">
<jxb:class name="Sample"/>
</jxb:bindings>
...
So my intention is to create class called "Sample.java". It gets
generated also. But, the class created for element "Sample_Protocl",
contains API getSampInfo(), which returns a class called "SampInfo".
i.e; the signature is:
public SampInfo getSampInfo()
Where as I expected the getter method to be generated with following signature:
public Sample getSampInfo()
What xjb entry nees to be added? I guess the element
<jxb:bindings node="//xsd:element[@name='Sample_Protocl']> needs to
have some reference to "Sample" instead of "Samp".
If you have any Idea, let me know.
Thanks in advance
Ranjith