Hi,

Looking into this further it seems that if you unmarshall like;

       Unmarshaller unmar = new
Unmarshaller(com.fineos.ta.test.garage.bo.xmlTypes.castor.Person.class);
        unmar.setIgnoreExtraElements(true);  

Where the PersonDescriptor extends BusinessEntityDescriptor then the OID
(which is defined in the BusinessEntity) is ignored and therefore we get a
ValidationException like;

Error:
com.fineos.ta.test.driver.OTestCases.XMLToJavaBindingTests.XMLToJavaBindingT
ests_CastorBusinessEntityValidationException: oid is a required field.;
  

If 'unmar.setIgnoreExtraElements(true);' is commented out then we get the
exception';

Error:
com.fineos.ta.test.driver.OTestCases.XMLToJavaBindingTests.XMLToJavaBindingT
ests_CastorBusinessEntityorg.xml.sax.SAXException: unable to find
FieldDescriptor for 'oid' in ClassDescriptor of Person
        
Does anyone know whether there was a bug introduced in version 0.9.5.2 to do
with inheritance or is there someting else I should be trying.

thanks,

Brian
-----Original Message-----
From: Brian Dillon (ext. 944) [mailto:[EMAIL PROTECTED]
Sent: 17 October 2003 14:38
To: [EMAIL PROTECTED]
Subject: [castor-dev] Marshalled Object Not Unmarshalled correclty


Hi,

I have recently (in the past couple of days) moved from Castor 0.9.3.21 to
0.9.5.2. I am now seeing an issue were an object marhsalled by castor as;

<Person xmlns="http://www.fineos.com/XMLSchema/ta/garage";>
<ns1:oid
xmlns:ns1="http://www.fineos.com/XMLSchema/ta";>PE:3003:34456</ns1:oid>
</Person>

Where Person extends an Object called BusinessEntity;

If I try to unmarshall this as a Person I get a validation exception;

Error:
com.fineos.ta.test.driver.OTestCases.XMLToJavaBindingTests.XMLToJavaBindingT
ests_CastorBusinessEntityValidationException: oid is a required field.;
  
Is there some new issue to do with namespaces (for extended types) and
unmarshalling that I should know about ?

Thanks,

Brian


**********************************************************************
The information contained in this e-mail is confidential, may be privileged
and is intended only for the user of the recipient named above.  If you are
not the intended recipient or a representative of the intended recipient,
you have received this e-mail in error and must not copy, use or disclose
the contents of this e-mail to anybody else.  If you have received this
e-mail in error, please notify the sender immediately by return e-mail and
permanently delete the copy you received.  This e-mail has been swept for
computer viruses.  However, you should carry out your own virus checks. 
Registered in Ireland, No. 205721.  http://www.FINEOS.com
**********************************************************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to