[
https://issues.apache.org/jira/browse/CXF-1278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-1278.
------------------------------
Resolution: Fixed
> ObjectFactory.class is missing when a JAXBContext is created and no WS
> addressing information is added
> ------------------------------------------------------------------------------------------------------
>
> Key: CXF-1278
> URL: https://issues.apache.org/jira/browse/CXF-1278
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.0.3
> Reporter: Edell Nolan
> Fix For: 2.0.4
>
>
> Hi,
> I have a method that i pass across an EndpointReferenceType created as below.
> EndpointReferenceType ref =
> EndpointReferenceUtils.getEndpointReferenceWithId(.....) method
> I attempt to Convert data to Xml and within the method it calls
> So obj is an EndpointReferenceType.
> Class<?> cls = obj instanceof JAXBElement
> ? ((JAXBElement)obj).getDeclaredType()
> : obj.getClass();
> JAXBContext context = null;
> Class[] classes = new Class[] {cls};
> context = new JAXBDataBinding(classes).getContext();
> The real bug is here. We end up having no ObjectFactory.class in the context
> and as a consequence no WS information is added.
> There was a condition in the code in JAXBDataBinding class to check the
> following
> private void addWsAddressingTypes(Set<Class<?>> classes) {
> if (classes.contains(EndpointReferenceType.class)
> || classes.contains(ObjectFactory.class)) {
> ......................
> }
> but the check for EndpointReferenceType was removed as it is expected that an
> ObjectFactory.class will always have been added.
> Dan has also inidicated that it could be in the JAXBContextInitializer area.
> The workaround is to put the check back in but the fix is to find out why the
> ObjectFactory.class was not added.
> thanks, Edell.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.