Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] R: FW: MOXy 'Binding handler'

Title: R: FW: [eclipselink-users] MOXy 'Binding handler'

Hi Blaise,
in our 'old' software version we used sax events to dinamically build the xpath during the unmarhall process.

Then, in jaxb ValidationEventHandler, we save the xpath for all wrong fields and allow unmarshall process to continue.

At the end of the umarshall process we have the jaxb dto filled and a list of not valid fields.
Then, using jxpath, we can eventually fix properties values.

Switching to MOXy we cannot use jxpath anymore, so it was great if MOXy will provide the functionality to fix the error during the unmarshall process.

Thank you,
i will enter a MOXy bug for this.

Daniele


-----Messaggio originale-----
Da: Blaise Doughan [mailto:blaise.doughan@xxxxxxxxxx]
Inviato: gio 17/02/2011 18.35
A: Adriano Daniele
Cc: EclipseLink User Discussions
Oggetto: Re: FW: [eclipselink-users] MOXy 'Binding handler'

Hello Daniele,

JAXB provides the concept of a ValidationEventHandler so that you can be
notified of the error, unfortunately it does not give you the
opportunity to fix the error during the marshal/unmarshal.  Could you
enter a MOXy bug (enhancement) for this?

    * http://bdoughan.blogspot.com/2010/12/jaxb-and-marshalunmarshal-schema.html

-Blaise

>
> *From:* Adriano Daniele [mailto:Daniele.Adriano@xxxxxxxxxxxxx]
> *Sent:* February 16, 2011 8:05 AM
> *To:* EclipseLink-users@xxxxxxxxxxx
> *Subject:* [eclipselink-users] MOXy 'Binding handler'
>

>
> Hi,
> i want to ask you if MOXy provides a handler to modify the property
> value if a validation error occurs during the binding.
>
>
> I want to show you an example to explain what i mean:
>
> <element>XX</element> has maxLength=1 schema restriction
>
> 1. unmarshall call
> 2. presumed characters handler: here i'm able to evaluate the
> validation error and to modify the element value (for example i can
> truncate XX value)
> 3. unmarshaller will bind the modified element value to the dto property
>
> Does MOXy provides or will provides the functionality to act between
> point 2 and point 3?
>
> Thank you,
> Daniele
>
>
>
>
>
>


Back to the top