users@jaxb.java.net

RE: How to Change package name to targetnamespace in XJC ant task

From: Deepak Gaikwad <deepakbgaikwad_at_hotmail.com>
Date: Thu, 31 Jan 2008 15:00:32 +0530

Hi Felipe,
 
Let me tell you additional information which I missed early. Currently I am not using package attibute and asking XJC to pick all files from multiple folders with *.xsd some thing like below.
 
<xjc target="${project.temp.dir.java.interfaces}" source="2.0" >

<schema dir="${project.src.dir.interfaces.commonTypes}" includes="*.xsd"/>
<schema dir="${project.src.dir.interfaces.locateDealerRequest}" includes="*.xsd" />
<schema dir="${project.src.dir.interfaces.locateDealerResponse}" includes="*.xsd" />
.
.
.

</xjc>
 
Now , it is generating the java classes using package name as specified in the targetnamespace of the schema but all small case letters. In other words the package name is same as targetnamespace but only XJC is giving all letters as small case instead of actual case.
 
It is not picking the actual case of the targetnamespace attribute. Even if XJC does that my issue will be resolved.Deepak Gaikwad Software Engineer > Date: Thu, 31 Jan 2008 10:17:52 +0100> From: fgaucho_at_gmail.com> To: users_at_jaxb.dev.java.net> Subject: Re: How to Change package name to targetnamespace in XJC ant task> > humm.. an alternative can be to use ant cascade, where you create ant> build files for each folder, and create a root one to trigger the> others.....> > On Jan 31, 2008 10:08 AM, Deepak Gaikwad <deepakbgaikwad_at_hotmail.com> wrote:> >> > Thanks ,> >> > I have thought about that but I have many schema files stored under> > mulitple folders. If I was to use package attribute I will have to use XJC> > task explicitely for each scheam files.> > Is there a mechanism to tell XJC to pick package name as definded in the> > targetnamespace attibute of the scheam. This way , I will not have to hard> > code many package names.> >> >> > Deepak Gaikwad> > Software Engineer> >> >> > > Date: Thu, 31 Jan 2008 09:58:33 +0100> > > From: fgaucho_at_gmail.com> > > To: users_at_jaxb.dev.java.net> > > Subject: Re: How to Change package name to targetnamespace in XJC ant task> >> >> > >> > > use the package attribute:> > >> > > <target name="compileschema">> > > <echo message="Compiling the Curriculum XML Schema..." />> > > <mkdir dir="${jaxb.classes.dir}" />> > > <xjc schema="${schema}" extension="true"> > > classpath="${build.dir.classes}" target="${generated.dir}"> > > package="${jaxb.bindingclasses.package}"> <!-- - - - HERE -->> > > <produces dir="${jaxb.classes.dir}" includes="**/*.java" />> > > </xjc>> > > <javac srcdir="${generated.dir}" destdir="${generated.dir}"> > > debug="off" source="1.6" />> > > <jar destfile="lib/footprint-config.jar" basedir="${generated.dir}"> > > excludes="**/*.java" />> > > <delete dir="${generated.dir}" />> > > </target>> > >> > > On Jan 31, 2008 9:36 AM, Deepak Gaikwad <deepakbgaikwad_at_hotmail.com>> > wrote:> > > >> > > > Hi> > > >> > > > I am using XJC ant task but it is giving package name all in smallcase> > > > letters. It is not picking package name from scheam targetnamespace> > > > attribute.> > > >> > > > How do I forece XJC ant task to pick package name from targetnamespace> > > > attribute.> > > >> > > > Deepak Gaikwad> > > > Software Engineer> > > >> > > >> > > > ________________________________> > > > Detailed profiles 4 marriage! Only at Shaadi.com Try it!> > >> > > ---------------------------------------------------------------------> > > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net> > > For additional commands, e-mail: users-help_at_jaxb.dev.java.net> >> > >> >> >> > ________________________________> > Detailed profiles 4 marriage! Only at Shaadi.com Try it!> > ---------------------------------------------------------------------> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net> For additional commands, e-mail: users-help_at_jaxb.dev.java.net>
_________________________________________________________________
Post ads for free - to sell, rent or even buy.www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=186