List<Handler> bindings = soapClient.getBinding().getHandlerChain();
bindings.add(contextHandlerFactory.getJaxWsSoapContextHandler());
soapClient.getBinding().setHandlerChain(bindings);
return soapClient;
}
throw new ServiceException("Service [" + soapServiceDescriptor +
"] is not compatible with JAX-WS", null);
} catch (SecurityException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (NoSuchMethodException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (IllegalArgumentException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (IllegalAccessException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (InvocationTargetException e) {
throw new ServiceException("Unexpected Exception.", e.getCause());
} catch (ClassNotFoundException e) {
throw new ServiceException("Unexpected Exception.", e);
} catch (InstantiationException e) {
throw new ServiceException("Unexpected Exception.", e);
}
}