} else {
hcAnn.validate();
try {
URL handlerFileURL = clz.getResource(hcAnn.getFileName());
HandlerChains handlerChainsType;
InputStream in = null;
try {
if (handlerFileURL == null) {
handlerFileURL = new URL(hcAnn.getFileName());
}
in = handlerFileURL.openStream();
handlerChainsType = (HandlerChains) JaxbJavaee.unmarshalHandlerChains(HandlerChains.class, in);
} catch (Exception e) {
throw new WebServiceException("Could not read the chain info from " + hcAnn.getFileName(), e);
} finally {
IOUtils.close(in);
}
if (null == handlerChainsType || handlerChainsType.getHandlerChain().isEmpty()) {
throw new WebServiceException("Chain not specified for class " + clz.getName());
}
handlerChainsInfo = handlerChainsInfoBuilder.build(handlerChainsType);