Hi,
Thanks for the reply, but I am using jaxb impl packed with jwsdp 1.5,
ie; 1.0.4b.. version of jaxb impl. Please let me know if you are using
any implementation which doesnt require jdk 5.0
Thanks
ranjith
On 6/22/05, Sekhar Vajjhala <Sekhar.Vajjhala_at_sun.com> wrote:
> Ranjith,R wrote:
>
> >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()
> >
> I tried your example with an internal version of the JAXB RI that I have.
> It does generate the above signature. If you are running an older version
> of JAXB RI, perhaps you can try with a later version.
>
> Also note if you want
>
> public Sample getSample()
> instead of
> public Sample getSampInfo()
>
> then you can the you can the JAXB <property> customization on
> <element name="SampInfo">
>
> Sekhar
>
> >
> >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
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> >For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> >
> >
> >
> regards
> Sekhar Vajjhala
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>