com.sun.xml.internal.ws.util.HandlerAnnotationInfo Java Examples
The following examples show how to use
com.sun.xml.internal.ws.util.HandlerAnnotationInfo.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HandlerConfigurator.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #2
Source File: DeploymentDescriptorParser.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #3
Source File: HandlerConfigurator.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #4
Source File: HandlerConfigurator.java From hottub with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #5
Source File: DeploymentDescriptorParser.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #6
Source File: DeploymentDescriptorParser.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #7
Source File: HandlerConfigurator.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #8
Source File: DeploymentDescriptorParser.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #9
Source File: HandlerConfigurator.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #10
Source File: DeploymentDescriptorParser.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #11
Source File: DeploymentDescriptorParser.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #12
Source File: HandlerConfigurator.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #13
Source File: HandlerConfigurator.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #14
Source File: DeploymentDescriptorParser.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #15
Source File: DeploymentDescriptorParser.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Parses the handler and role information and sets it * on the {@link WSBinding}. * * @return true if <handler-chains> element present in DD * false otherwise. */ protected boolean setHandlersAndRoles(WSBinding binding, XMLStreamReader reader, QName serviceName, QName portName) { if (reader.getEventType() == XMLStreamConstants.END_ELEMENT || !reader.getName().equals(HandlerChainsModel.QNAME_HANDLER_CHAINS)) { return false; } HandlerAnnotationInfo handlerInfo = HandlerChainsModel.parseHandlerFile( reader, classLoader, serviceName, portName, binding); binding.setHandlerChain(handlerInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(handlerInfo.getRoles()); } // move past </handler-chains> XMLStreamReaderUtil.nextContent(reader); return true; }
Example #16
Source File: HandlerConfigurator.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
void configureHandlers(WSPortInfo port, BindingImpl binding) { //Check in cache first HandlerAnnotationInfo chain = chainMap.get(port); if(chain==null) { logGetChain(port); // Put it in cache chain = handlerModel.getHandlersForPortInfo(port); chainMap.put(port,chain); } if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chain.getRoles()); } logSetChain(port,chain); binding.setHandlerChain(chain.getHandlers()); }
Example #17
Source File: EndpointFactory.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #18
Source File: EndpointFactory.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #19
Source File: HandlerChainsModel.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #20
Source File: HandlerChainsModel.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #21
Source File: EndpointFactory.java From hottub with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #22
Source File: HandlerChainsModel.java From hottub with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #23
Source File: HandlerChainsModel.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #24
Source File: EndpointFactory.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #25
Source File: HandlerChainsModel.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #26
Source File: EndpointFactory.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #27
Source File: HandlerChainsModel.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #28
Source File: EndpointFactory.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }
Example #29
Source File: HandlerChainsModel.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public HandlerAnnotationInfo getHandlersForPortInfo(PortInfo info){ HandlerAnnotationInfo handlerInfo = new HandlerAnnotationInfo(); List<Handler> handlerClassList = new ArrayList<Handler>(); Set<String> roles = new HashSet<String>(); for(HandlerChainType hchain : handlerChains) { boolean hchainMatched = false; if((!hchain.isConstraintSet()) || JAXWSUtils.matchQNames(info.getServiceName(), hchain.getServiceNamePattern()) || JAXWSUtils.matchQNames(info.getPortName(), hchain.getPortNamePattern()) || hchain.getProtocolBindings().contains(info.getBindingID()) ){ hchainMatched = true; } if(hchainMatched) { for(HandlerType handler : hchain.getHandlers()) { try { Handler handlerClass = (Handler) loadClass(annotatedClass.getClassLoader(), handler.getHandlerClass()).newInstance(); callHandlerPostConstruct(handlerClass); handlerClassList.add(handlerClass); } catch (InstantiationException ie){ throw new RuntimeException(ie); } catch (IllegalAccessException e) { throw new RuntimeException(e); } roles.addAll(handler.getSoapRoles()); } } } handlerInfo.setHandlers(handlerClassList); handlerInfo.setRoles(roles); return handlerInfo; }
Example #30
Source File: EndpointFactory.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static <T> void processHandlerAnnotation(WSBinding binding, Class<T> implType, QName serviceName, QName portName) { HandlerAnnotationInfo chainInfo = HandlerAnnotationProcessor.buildHandlerInfo( implType, serviceName, portName, binding); if (chainInfo != null) { binding.setHandlerChain(chainInfo.getHandlers()); if (binding instanceof SOAPBinding) { ((SOAPBinding) binding).setRoles(chainInfo.getRoles()); } } }