[ https://issues.apache.org/jira/browse/CAMEL-9421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058688#comment-15058688 ]
Joseph Kampf edited comment on CAMEL-9421 at 12/15/15 8:22 PM: --------------------------------------------------------------- I found that if I use the Data format of "PAYLOAD", I am able to get the correct Service Factory. However that means my route needs to use a jaxbFormat to unmarshal and marshal the XML to the JaxWS classes. was (Author: jkampf): I found that if I use the Data format of "MESSAGE", I am able to get the correct Service Factory. However that means my route needs to use a jaxbFormat to unmarshal and marshal the XML to the JaxWS classes. > CxfEndpoint Not using proper Service Factory when javax.jws.WebService is > proxied > --------------------------------------------------------------------------------- > > Key: CAMEL-9421 > URL: https://issues.apache.org/jira/browse/CAMEL-9421 > Project: Camel > Issue Type: Bug > Components: camel-cxf > Affects Versions: 2.13.3 > Environment: karaf 3.0.2 > Reporter: Joseph Kampf > > Clearing out the karaf/data/cache directory and then doing a fresh deploy of > the Bundle works fine. > However after restarting Karaf the > org.apache.cxf.jaxws.JaxWsServerFactoryBean is not used by the CxfEndpoint. > Instead the org.apache.cxf.frontend.ServerFactoryBean is used. This causes > the mapping of WSDL Operations to SEI methods to not work. > This results in error messages: > {quote} > 2015-12-15 09:51:18,729 | WARN | xtenderThread-42 | > ReflectionServiceFactoryBean | 194 - org.apache.cxf.cxf-rt-core - 2.7.11 > | No method was found for the WSDL operation <%WSDL Operation%>{quote} > It also causes the CXF page to not list the WSDL Operations under the SOAP > Port. > The reason this is happening is because the annotations that are on the SEI > class are proxied. This causes the annotation check in > org.apache.camel.component.cxf.CxfSpringEndpoint.createServerFactoryBean() to > seem as if the SEI does not have the javax.jws.WebService annotation. > The annotation is on the list of annotations for the SEI, but they are > proxied by sun.reflect.annotation.AnnotationInvocationHandler. > One solution I see would be to change the implementation of > org.apache.camel.component.cxf.CxfEndpointUtils.hasAnnotation() method. > Instead of relying on Class.getAnnoation(), instead loop through the > annotations on the class and not only check the annotation class directly, > but also try to reach into the annotation to determine if it is a proxy of > the annotation in question. -- This message was sent by Atlassian JIRA (v6.3.4#6332)