Java 8 HandlerResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 HandlerResolver class.

This code example shows how to use the following methods:getHandlerChain
        ServiceDescription serviceDesc = 
            DescriptionFactory.createServiceDescription(null, serviceQName, HandlerResolverTestService.class, sparseComposite, serviceDelegateKey);
        HandlerResolver resolver = new HandlerResolverImpl(serviceDesc);
        assertNotNull(resolver);
        PortInfo pi = new DummyPortInfo();
        List<Handler> list = resolver.getHandlerChain(pi);
        assertEquals(0, list.size());
    } 
     
    /** 
     * The sparse composite has handler config information for the key that the HandlerResolver 
     * is created with, so that handler resolver contains those handlers.  However, the  
     * portInfo specified on the getHandlerChain does NOT match the QName in the config file 
     * so no handlers should be returned. 
     */ 
    public void testHandlerResolverInvalidPortInfo() { 
        QName serviceQName = new QName(namespaceURI, svcLocalPart);
        QName portQName = new QName(namespaceURI, portWrongLocalPart);
        // Create a composite with a JAXB Handler Config  
        DescriptionBuilderComposite sparseComposite = new DescriptionBuilderComposite();
4
CodeRank
This code example shows how to use the following methods:getHandlerChain
    public void testHandlerResolver() { 
        String path = "/configuration/handlers/handler.xml";
        File file = new File(testResourceDir, path);
        HandlerResolver resolver = new HandlerResolverImpl(file);
        PortInfo pi = new DummyPortInfo();
        List<Handler> list = resolver.getHandlerChain(pi);
        assertEquals(2, list.size());
    } 
     
    public class DummyPortInfo implements PortInfo {
 
        public String getBindingID() {
            return SOAPBinding.SOAP11HTTP_BINDING;
        } 
 
        public QName getPortName() {
            return new QName("http://www.apache.org/test/namespace", "DummyPort");
        } 
 
        public QName getServiceName() {
4
CodeRank
See Code Examples for Java 8 HandlerResolver Methods: