users@jaxb.java.net

Re: Property Name binding

From: Sekhar Vajjhala <sekhar.vajjhala_at_sun.com>
Date: Tue, 17 Jun 2003 09:21:07 -0600

On Tue, 17 Jun 2003 12:57:42 +0530, Mihir B Joshi <mihir.joshi_at_iflexsolutions.com> wrote:

>Hi,
>
>I have attached below a sample xsd. When I generate the schema derived java classes from it, ROOTType.java has 2 method declarations getTRNRQ1OrTRNRQ2 and getTRNRS1OrTRNRS2. Now I want to apply property name binding customisation so that I can change the names of these methods.
>
>Both the methods map to a list of TRNType. I cant figure out how to specify the property name customisation for these methods using an external bindings file. Can anyone please help me on this.

For TRNRQ1OrTRNRQ2 try this:
        <jxb:bindings node="//xs:complexType[@name='ROOTType']/xs:choice/xs:sequence[1]/xs:sequence">
      <jxb:property name="Foo"/>
    </jxb:bindings>

For TRNRS1OrTRNRS2 use this:

       <jxb:bindings node="//xs:complexType[@name='ROOTType']/xs:choice/xs:sequence[2]/xs:sequence">
      <jxb:property name="Bar"/>
    </jxb:bindings>


See external-customize sample in the JAXB samples directory in JWSDP1.2
for an example of external customization.

Also, we expect tools will eliminate the need to write XPath expressions
by hand.

Sekhar Vajjhala
Sun Microsystems Inc.

>
>Regards
>Mihir
>Tel: Ext: 2249
> _____
>
>
>
>
>DISCLAIMER:
>This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
>