protected ClientFactoryBean createClientFactoryBean(Class<?> cls) throws CamelException {
if (CxfEndpointUtils.hasWebServiceAnnotation(cls)) {
return new JaxWsClientFactoryBean() {
@Override
protected Client createClient(Endpoint ep) {
Client client = new CamelCxfClientImpl(getBus(), ep);
this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, client, ep);
return client;
}
};
} else {
return new ClientFactoryBean() {
@Override
protected Client createClient(Endpoint ep) {
Client client = new CamelCxfClientImpl(getBus(), ep);
this.getServiceFactory().sendEvent(FactoryBeanListener.Event.CLIENT_CREATED, client, ep);
return client;
}
};
}