> Castor generates a classes for

       EquityDerivativeBase.java
       ProductComplex.java

which we expected but it also generated

        BuyerSeller_model.java

which we did not.  In other words, it is as if Castor is expecting a
BuyerSeller_model element in the document, which it should not.

Carlo,

I checked the sourcecode and found out that this is common castor behaviour. Castor creates a member and a descriptor for the group. The descriptor knows how to unmarshall/unmarshall so no "BuyerSeller_model" element is expected.

I added a root element to your schema

<xsd:element name="root" type="EquityDerivativeBase"/>


and tried to unmarshall the following

(1) Test should be ok

<root>
        <id>test</id>
        <buyerPartyReference>test</buyerPartyReference>
        <sellerPartyReference>test</sellerPartyReference>
</root>


(2) exception expected

<root>
        <id>test</id>
        <BuyerSeller.model>
          <buyerPartyReference>test</buyerPartyReference>
          <sellerPartyReference>test</sellerPartyReference>
        </BuyerSeller.model>      
</root>


Everything works fine, in case (1) the element is unmarshalled, in case (2) an exception is thrown:

"unable to find FieldDescriptor for 'BuyerSeller.model' in ClassDescriptor of 
root".


So the "BuyerSeller_model.java" is just for internal use and doesn't bother the unmarshalling.

Regards,

Matthias

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

   http://xircles.codehaus.org/manage_email

Reply via email to