use of com.sun.xml.ws.handler.HandlerChainsModel in project metro-jax-ws by eclipse-ee4j.
the class HandlerAnnotationProcessor method buildHandlerChainsModel.
public static HandlerChainsModel buildHandlerChainsModel(final Class<?> clazz) {
if (clazz == null) {
return null;
}
HandlerChain handlerChain = clazz.getAnnotation(HandlerChain.class);
if (handlerChain == null)
return null;
InputStream iStream = getFileAsStream(clazz, handlerChain);
XMLStreamReader reader = XMLStreamReaderFactory.create(null, iStream, true);
XMLStreamReaderUtil.nextElementContent(reader);
HandlerChainsModel handlerChainsModel = HandlerChainsModel.parseHandlerConfigFile(clazz, reader);
try {
reader.close();
iStream.close();
} catch (XMLStreamException | IOException e) {
e.printStackTrace();
throw new UtilException(e.getMessage());
}
return handlerChainsModel;
}
Aggregations