Hi,

Ranganadha Swamy Vavilikolanu wrote:
> Hello, We have been using castor 0.9.4.3 from a long time and
> generating source from a XSD schema. When we are generating the java
> source from this same schema using castor 1.2, there are lot of
> differences in te way the files are generated, i.e., number of
> classes, class definition of each of these classes generated. I am
> using javaclassmapping as element. Can I change any properties in
> castor and achieve generating the same definition of classes using
> 1.2? 
No, as the product clearly has evolved and matured over time, and
changes are natural (as we are fixing bugs, dealing with changes in
Java, etc.).

> As an example, in the schema I am using to generate the classes,
> there is a complex type named "AcctType". There is an element named
> "AcctElement" and the type of this element is "AcctType". When we
> generated using castor 0.9.4.3, the java class AcctElement is created
> which extends AcctType. The unmarshal method in this class is
> returning AcctElement. But with castor1.2 generated class, the
> unmarshal method is returning AcctType. This is one example of the
> differences I see.
Which in this case is easy to explain. Before we changed this (actually
fixed this), it was impossible to get this running on Java 5.0, as Java
changed a few things around static methods and inheritance.

> Is there any way we can minimize the differences?
There's a few (backward compatibility) options that have been introduced
in the past 12 months or so, but this hardly touches code generation.

I have had a client about a year ago which converted from Castor 0.9.5
to 1.1 at that time, and they had lots of issues similar to yours. In
the end, there was no other way than changing their code that used the
generated classes. Painful in some way, but unavoidable.

> Any help is greatly appreciated! Thanks, Swamy
> 
> 
> 
> 
> ---------------------------------------------------------------------
>  To unsubscribe from this list, please visit:
> 
> http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to