[
https://issues.apache.org/jira/browse/CXF-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582323#action_12582323
]
Daniel Kulp commented on CXF-1492:
----------------------------------
Can you attach a sample JAXB class or something that I can look at?
We pretty much have to walk the references. Otherwise, we're likely to not
pick up everything that is required and users would then end up with failures
that are very hard to diagnose and they would have to do special configuration
to get the extra classes that would be needed into the context. (such as add
@XmlSeeAlso annotations all over the place)
I'd rather find a solution that would keep the references. Possibly if the
field/property has an @XmlJavaTypeAdapter annotation, don't include it itself.
> JAXB databinding adds classes recursively to JAXBContext. The reference impl.
> adds only the request and response classes.
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-1492
> URL: https://issues.apache.org/jira/browse/CXF-1492
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Environment: snapshot 20080130
> Reporter: Gyorgy Orban
> Attachments: JAXBContextInitializer.patch
>
>
> This can cause problems with custom JAXB type adapters. Since CXF walks the
> classes recursively in JAXBContextInitializer, it adds the custom type's xml
> schema to the wsdl. Because these classes are intended for internal usage
> only they should not be part of the contract. If, for example, we have an
> adapter for xs:date we don't want to see in the wsdl the schema of the class
> that xs:date is mapped to internally.
> This is a patch against JAXBContextInitializer that worked for us:
> 53a54
> >
> 149,152d149
> < if (!Throwable.class.equals(cls)
> < && !Exception.class.equals(cls)) {
> < walkReferences(cls);
> < }
> 165d161
> < walkReferences(cls);
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.