}
}
public static ClientFactoryBean getClientFactoryBean(Class<?> cls) throws CamelException {
ClientFactoryBean clientFactory = null;
try {
if (cls == null) {
clientFactory = new ClientFactoryBean();
clientFactory.setServiceFactory(new WSDLSoapServiceFactoryBean());
} else {
boolean isJSR181SEnabled = CxfEndpointUtils.hasWebServiceAnnotation(cls);
clientFactory = isJSR181SEnabled ? new JaxWsClientFactoryBean()
: new ClientFactoryBean();
}
return clientFactory;
} catch (Exception e) {
throw new CamelException(e);
}