aspose file tools*
The moose likes XML and Related Technologies and the fly likes Specify superclass for Java Objects generated from XSD using castor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Specify superclass for Java Objects generated from XSD using castor" Watch "Specify superclass for Java Objects generated from XSD using castor" New topic
Author

Specify superclass for Java Objects generated from XSD using castor

Elinor Chang
Ranch Hand

Joined: Jul 30, 2003
Posts: 58
The casterbuilder.properties file has an option for you to specify a superclass for all java objects generated from castor. However, the properties file are included in the caster-xml.jar file. Is there anyway I could overwrite the parameter/value when perform the data binding?

Thanks!


The more I learn, the less I know....<br /> <br />SCJP2 <br />SCWCD
Bindul Bhowmik
Greenhorn

Joined: Dec 30, 2003
Posts: 2
Is there anyway I could overwrite the parameter/value when perform the data binding?


Have a properties file called castor.properties in your ${JAVA_HOME}/lib or working directory (from where you are calling Castor) and properties in this file will override those which are defined in the jar file.

The entries from the file in your working directory have the highest preference and the one in the jar the lowest.

Another workaround: Get the source files of Castor from the distribution or CVS and change the values in the properties file. Though this dosen't look neat!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Specify superclass for Java Objects generated from XSD using castor