camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller (JIRA) <>
Subject [jira] [Commented] (CAMEL-5278) Allow JaxbDataFormat to (un)marshall with strict schema validation
Date Mon, 17 Dec 2012 18:24:12 GMT


Christian Müller commented on CAMEL-5278:

I don't think it makes sense to have the methods "setMarshallerSchema" and "setUnMarshallerSchema".
In which case they are different?

I propose the following API:
DataFormat jaxb = new JaxbDataFormat("com.acme.model");

<jaxb id="jaxb" schema="locationOfTheSchema"/>

Instead of "schema", we can also use "schemaLocation"...
If a schema is specified, the validation is enabled for marshalling *AND* unmarshalling. If
the user only want the validation for one of them, he can simple define two JAXB data formats
which are pointing to the same JAXB context path. One with the schema specified and one without.
> Allow JaxbDataFormat to (un)marshall with strict schema validation 
> -------------------------------------------------------------------
>                 Key: CAMEL-5278
>                 URL:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jaxb
>    Affects Versions: 2.9.2
>            Reporter: Frank Kootte
>            Assignee: Christian Müller
> Currently JaxbDataFormat does not allow to (un)marshall payloads with strict schema validation.
I would like to propose to add 2 methods called set(Un)MarshallerSchema which could either
be 1:1 proxies to the JAXB (Un)Marshaller methods or provide a somewhat more convenient signature
delegating the work to the JaxbDataFormat to allow the call site code to be more concise.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message