Hi John,

You can enable Castor to "ignore extra elements". By setting this on the
Unmarshaller instance you are using
(Unmarshaller#setIgnoreExtraElements). This can also be configured
globally in the castor.properties file.

Any extra elements not found in the class descriptors will be ignored,
not just the new timestamp2.

--Keith

"Hoebel, John" wrote:
> 
> Hi,
> 
> Here is the situation:
> 
> 1. Have a schema version 1 that we create Castor classes with.
> 2. We use version 1 castor classes to use in application.
> 3. The application works fine.
> 4. A new element is added to schema and version 2 of schema is now going
> to be used in sending xml.
> 5. The additional element is not used in our application. We would like
> not to have to re-build the application and re-deploy the application
> for this irrelevant (to our application) field.
> 
> Question:
> 
> Is there a way to have Castor ignore this new field without exceptioning
> out on the unmarshaling?  The exception is shown below.
> 
> Thanks in advance for any help.
> John
> 
> Exception unmarshaling XXX request:
> org.xml.sax.SAXException: unable to find FieldDescriptor for
> 'timestamp2' in ClassDescriptor ...
> 
> -----------------------------------------------------------
> 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