protected void setupHandlers(ClientFactoryBean factoryBean, Client client)
throws Exception {
if (factoryBean instanceof JaxWsClientFactoryBean && handlers != null) {
AnnotationHandlerChainBuilder
builder = new AnnotationHandlerChainBuilder();
Method m = factoryBean.getClass().getMethod("getServiceFactory");
JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)m.invoke(factoryBean);
@SuppressWarnings("rawtypes")
List<Handler> chain = new ArrayList<Handler>(handlers);
chain.addAll(builder.buildHandlerChainFromClass(sf.getServiceClass(),
sf.getEndpointInfo().getName(),
sf.getServiceQName(),
factoryBean.getBindingId()));
if (!chain.isEmpty()) {