Thanks Dan ! That is really some special thing for XMLGregorianCalendar in JAXB to handle the things as JAXWS 2.2 TCK expected. Good to know it has been fixed in the latest JAXB impl.
Jim On Wed, Nov 17, 2010 at 7:39 AM, Daniel Kulp <[email protected]> wrote: > On Tuesday 16 November 2010 5:40:52 pm Daniel Kulp wrote: >> 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? > > I added a test case for CXF-2868 and it seems to pass fine. Thus, it's > likely that it was a bug in JAXB that is now fixed with the latest JAXB > implementations. I'll revert out the change for CXF-2868. > > Dan > > >> >> 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 >
