users@jaxb.java.net

Re: Customize packagae name using external binding file

From: Carlos Alegría <ccristoo_at_gmail.com>
Date: Fri, 1 Feb 2008 10:48:12 -0600

Hi,

I'm not sure if this is what you need:

<?xml version="1.0" encoding="UTF-8"?>
<jxb:bindings jxb:version="2.1"
    xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb
http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd">

    <jxb:bindings schemaLocation="anSchema.xsd"
        node="/xsd:schema">
       <jxb:schemaBindings>
            <jxb:package
                name="a.package.name">
           </jxb:package>
        </jxb:schemaBindings>
    </jxb:bindings>
</jxb:bindings>

You can find more about the xjb format in the JAXB specification document,
that can be found
here<http://java.sun.com/webservices/reference/apis-docs/index.jsp>


On Feb 1, 2008 2:22 AM, Deepak Gaikwad <deepakbgaikwad_at_hotmail.com> wrote:

> Hi
>
> I have a scheam file a.xsd and the requirement is to customize the package
> name for the generated classes using external binding file ( .xjb). I am
> using XJC ant task to generate the classes.
>
> Please let me know snippet of the code of the biding file which will
> alllow me to mention the package name
>
>
> Deepak Gaikwad
> Software Engineer
>
>
> ------------------------------
> Fly HYD-BLR for Rs.499 Log on to MakeMyTrip! Check it out!<http://ss1.richmedia.in/recurl.asp?pid=266>
>