Aslam,

this won't be possible with Java, as the class MyElem derives from ElemType. Rememebr, with Java, one method (in an extension hierarchy) cannot have different return types in separate parts of this hierarchy.

How come your code used to work with Java 0.9.9, and does not work anymore now.

Werner

aslam wrote:
If my schema has the following:

<xsd:element name="myElem" type="ElemType" />
<xsd:complexType name="ElemType">
    ...
</xsd:complexType>

The unmarshal() methods generated for MyElem and ElemType, both, return type
ElemType. Is there a way to have the one for MyElem return type MyElem?

Background: I'm updating from Castor 0.9.* to the latest, and am getting
ClassCastExceptions with the existing code, which wants the return type of
unmarshal() to be that corresponding to the element name (MyElem), not its
superclass (ElemType).


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

   http://xircles.codehaus.org/manage_email

Reply via email to