Honestly, I'm not sure. The code was added as part of:
https://issues.apache.org/jira/browse/CXF-2868
but I'm not really sure why that doesn't work without the bridge. Jim?
Dan
On Tuesday 16 November 2010 3:50:05 am Marc Giger wrote:
> Hi all,
>
> In the DataReaderImpl class (line ~131 - 150) you will find the following
> code:
>
> //The jaxb class contains XMLGregorianCalendar field also needs JAXB Bridge
> if (part != null && part.getTypeClass() != null) {
> boolean useJAXBBridge = false;
> for (Field field : part.getTypeClass().getDeclaredFields()) {
> if (field.getType().equals(XMLGregorianCalendar.class)) {
> useJAXBBridge = true;
> break;
> }
> }
> if (useJAXBBridge) {
> return
> JAXBEncoderDecoder.unmarshalWithBridge(part.getConcreteName(),
> part.getTypeClass(), part.getTypeClass().getAnnotations(),
> databinding.getContextClasses(), reader, getAttachmentUnmarshaller()); }
> }
>
>
> return JAXBEncoderDecoder.unmarshall(createUnmarshaller(), reader,
> part, unwrapJAXBElement);
>
> What is the reason to use a Bridge when a XMLGregorianCalendar is declared?
>
> If an operation has a xs:dateTime as parameter, the bridge will be used and
> no schema validation can be performed.
>
> Kind regards
>
> Marc
--
Daniel Kulp
[email protected]
http://dankulp.com/blog