Examples of HandlerChainType


Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

            assertEquals(ClassNotFoundException.class, ex.getCause().getClass());
        }
    }

    private HandlerChainType createHandlerChainType() {
        HandlerChainType hc = new HandlerChainType();
        List<PortComponentHandlerType> handlers = hc.getHandler();

        PortComponentHandlerType h = new PortComponentHandlerType();
        org.apache.cxf.jaxws.javaee.CString name = new org.apache.cxf.jaxws.javaee.CString();
        name.setValue("lh1");
        h.setHandlerName(name);
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertSame(protocolHandlers[1], sortedHandlerChain.get(3));
    }

    public void testBuildHandlerChainFromConfiguration() {

        HandlerChainType hc = createHandlerChainType();
        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);

        assertNotNull(chain);
        assertEquals(4, chain.size());
        assertEquals(TestLogicalHandler.class, chain.get(0).getClass());
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertTrue(!tlh.initCalled);
        assertNull(tlh.config);
    }

    public void testBuilderCallsInit() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);

        PortComponentHandlerType h = hc.getHandler().get(0);
        List<ParamValueType> params = h.getInitParam();

        ParamValueType p = new ParamValueType();
        org.apache.cxf.jaxws.javaee.String pName = new org.apache.cxf.jaxws.javaee.String();
        pName.setValue("foo");
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertEquals("1", cfg.get("foo"));
        assertEquals("2", cfg.get("bar"));
    }

    public void testBuilderCallsInitWithNoInitParamValues() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);

        PortComponentHandlerType h = hc.getHandler().get(0);
        List<ParamValueType> params = h.getInitParam();

        ParamValueType p = new ParamValueType();
        org.apache.cxf.jaxws.javaee.String pName = new org.apache.cxf.jaxws.javaee.String();
        pName.setValue("foo");
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertNotNull(tlh.config);
        assertEquals(1, cfg.keySet().size());
    }

    public void testBuilderCannotLoadHandlerClass() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);
        FullyQualifiedClassType type = new FullyQualifiedClassType();
        type.setValue("no.such.class");
        hc.getHandler().get(0).setHandlerClass(type);

        try {
            builder.buildHandlerChainFromConfiguration(hc);
            fail("did not get expected exception");
        } catch (WebServiceException ex) {
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

            assertEquals(ClassNotFoundException.class, ex.getCause().getClass());
        }
    }

    private HandlerChainType createHandlerChainType() {
        HandlerChainType hc = new HandlerChainType();
        List<PortComponentHandlerType> handlers = hc.getHandler();

        PortComponentHandlerType h = new PortComponentHandlerType();
        org.apache.cxf.jaxws.javaee.String name = new org.apache.cxf.jaxws.javaee.String();
        name.setValue("lh1");
        h.setHandlerName(name);
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

            LOG.fine("no HandlerChain annotation on " + clz);
            chain = new ArrayList<Handler>();
        } else {
            hcAnn.validate();

            HandlerChainType hc = null;
            try {
                JAXBContext jc = JAXBContext
                        .newInstance(org.apache.cxf.jaxws.javaee.ObjectFactory.class);
                Unmarshaller u = jc.createUnmarshaller();               
                URL handlerFileURL  = clz.getResource(hcAnn.getFileName());
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

    }

    @Test
    public void testBuildHandlerChainFromConfiguration() {

        HandlerChainType hc = createHandlerChainType();
        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);

        assertNotNull(chain);
        assertEquals(4, chain.size());
        assertEquals(TestLogicalHandler.class, chain.get(0).getClass());
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertNull(tlh.config);
    }

    @Test
    public void testBuilderCallsInit() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);

        PortComponentHandlerType h = hc.getHandler().get(0);
        List<ParamValueType> params = h.getInitParam();

        ParamValueType p = new ParamValueType();
        org.apache.cxf.jaxws.javaee.String pName = new org.apache.cxf.jaxws.javaee.String();
        pName.setValue("foo");
View Full Code Here

Examples of org.apache.cxf.jaxws.javaee.HandlerChainType

        assertEquals("2", cfg.get("bar"));
    }

    @Test
    public void testBuilderCallsInitWithNoInitParamValues() {
        HandlerChainType hc = createHandlerChainType();
        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);

        PortComponentHandlerType h = hc.getHandler().get(0);
        List<ParamValueType> params = h.getInitParam();

        ParamValueType p = new ParamValueType();
        org.apache.cxf.jaxws.javaee.String pName = new org.apache.cxf.jaxws.javaee.String();
        pName.setValue("foo");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.