I am using camel 2.6.0 and have configured a cxf endpoint like this:

<cxf:cxfEndpoint id="dgwEndpoint"
                address="http://localhost:9090/my/mockServices";
                wsdlURL="classpath:wsdl/my.wsdl"
                serviceClass="com.acme.BusinessServicePort"
                serviceName="my:BusinessService"
            endpointName="my:DirectGateway"
            xmlns:my="http://my.acme.com"; />

BusinessServicePort is a JAX-WS annotated interface generated from the WSDL
using WSDL2Java.

When starting the route, a warning message pops up saying:

[pache.camel.spring.Main.main()] ReflectionServiceFactoryBean   WARN  A
JAX-WS Annotation was found on com.acme.BusinessServicePort while using the
Simple frontend.  For better results, use the JAX-WS frontend.

This alert does not appear when using camel 2.5.0, while it's still there
with camel 2.7.2.

Having looked at the code, it seems to me that the problem is in the
instantiation of the
org.apache.camel.component.cxf.spring.CxfSpringEndpointBean class.

The empty constructor is called, which in turn calls super() which
eventually instantiates
a ReflectionServiceFactoryBean, whereas a JaxWsServiceFactoryBean should be
used instead.

The setServiceClass() method in ReflectionServiceFactoryBean calls the
checkServiceClassAnnotations(serviceClass), where the warning is raised.

JaxWsServiceFactoryBean overrides that method with an empty one.

I don't know if this is a symptom of something else, but to me the warning
seems wrong.

Alberto





--
View this message in context: 
http://camel.465427.n5.nabble.com/Warning-in-cxf-endpoint-configuration-tp4561812p4561812.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to