Package org.objectweb.celtix.bus.jaxws.configuration.types

Examples of org.objectweb.celtix.bus.jaxws.configuration.types.ObjectFactory


        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);
        HandlerType h = hc.getHandler().get(0);
        List<HandlerInitParamType> params = h.getInitParam();
        HandlerInitParamType p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("foo");
        p.setParamValue("1");
        params.add(p);
        p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("bar");
        p.setParamValue("2");
        params.add(p);
       
        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);
View Full Code Here


        hc.getHandler().remove(3);
        hc.getHandler().remove(2);
        hc.getHandler().remove(1);
        HandlerType h = hc.getHandler().get(0);
        List<HandlerInitParamType> params = h.getInitParam();
        HandlerInitParamType p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("foo");
        params.add(p);
        p = new ObjectFactory().createHandlerInitParamType();
        p.setParamName("bar");
        params.add(p);
       
        List<Handler> chain = builder.buildHandlerChainFromConfiguration(hc);
        assertEquals(1, chain.size());
View Full Code Here

            // happy
        }
    }
   
    private HandlerChainType createHandlerChainType() {
        HandlerChainType hc = new ObjectFactory().createHandlerChainType();
        List<HandlerType> handlers = hc.getHandler();
        HandlerType h = new ObjectFactory().createHandlerType();
        h.setHandlerName("lh1");
        h.setHandlerClass(TestLogicalHandler.class.getName());
        handlers.add(h);
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("ph1");
        h.setHandlerClass(TestProtocolHandler.class.getName());
        handlers.add(h);
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("ph2");
        h.setHandlerClass(TestProtocolHandler.class.getName());
        handlers.add(h);
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("lh2");
        h.setHandlerClass(TestLogicalHandler.class.getName());
        handlers.add(h);
        return hc;
    }
View Full Code Here

        assertEquals(0, b.getPreProtocolSystemHandlers().size());
       
        control.verify();
        control.reset();
       
        shc = new ObjectFactory().createSystemHandlerChainType();
        c = control.createMock(Configuration.class);
        expect(c.getObject("systemHandlerChain")).andReturn(shc);
        control.replay();
       
        b.configureSystemHandlers(c);
View Full Code Here

        assertEquals(1, handlerChain.size());
        assertSame(handler, handlerChain.get(0));
    }

    public void testGetHandlerChainFromConfiguration() {
        ObjectFactory factory = new ObjectFactory();
        HandlerType h1 = factory.createHandlerType();
        h1.setHandlerClass(getClass().getPackage().getName() + ".TestHandler");
        h1.setHandlerName("first");
        HandlerType h2 = factory.createHandlerType();
        h2.setHandlerClass(getClass().getPackage().getName() + ".TestHandler");
        h2.setHandlerName("second");

        HandlerChainType chain = factory.createHandlerChainType();
        List<HandlerType> handlers = chain.getHandler();
        handlers.add(h1);
        handlers.add(h2);

        Configuration busConfiguration = createMock(Configuration.class);
View Full Code Here

        control.verify();
    }
   
   
    private SystemHandlerChainType createSystemHandlerChain() {
        SystemHandlerChainType shc = new ObjectFactory().createSystemHandlerChainType();
        HandlerChainType hc = new ObjectFactory().createHandlerChainType();
        List<HandlerType> handlers = hc.getHandler();
        HandlerType h = new ObjectFactory().createHandlerType();
        h.setHandlerName("lhs1");
        h.setHandlerClass(TestLogicalSystemHandler.class.getName());
        handlers.add(h);
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("lhs2");
        h.setHandlerClass(TestLogicalSystemHandler.class.getName());
        handlers.add(h);
        shc.setPreLogical(hc);
       
        hc = new ObjectFactory().createHandlerChainType();
        handlers = hc.getHandler();
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("lhs3");
        h.setHandlerClass(TestLogicalSystemHandler.class.getName());
        handlers.add(h);
        shc.setPostLogical(hc);
       
        hc = new ObjectFactory().createHandlerChainType();
        handlers = hc.getHandler();
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("phs1");
        h.setHandlerClass(TestProtocolSystemHandler.class.getName());
        handlers.add(h);
        shc.setPreProtocol(hc);
       
        hc = new ObjectFactory().createHandlerChainType();
        handlers = hc.getHandler();
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("phs2");
        h.setHandlerClass(TestProtocolSystemHandler.class.getName());
        handlers.add(h);
        h = new ObjectFactory().createHandlerType();
        h.setHandlerName("phs3");
        h.setHandlerClass(TestProtocolSystemHandler.class.getName());
        handlers.add(h);
        shc.setPostProtocol(hc);
       
View Full Code Here

        verify(busConfiguration);
        verify(portConf);
    }

    public void testHandlerClassNotFound() {
        ObjectFactory factory = new ObjectFactory();
        HandlerType h3 = factory.createHandlerType();
        h3.setHandlerClass("a.b.c.TestHandler");
        h3.setHandlerName("nonExistingClassHandler");

        HandlerChainType chain = factory.createHandlerChainType();
        List<HandlerType> handlers = chain.getHandler();
        handlers.add(h3);

        Configuration busConfiguration = createMock(Configuration.class);
        QName service = new QName("http://objectweb.org/hello_world_soap_http", "SOAP_Service");
View Full Code Here

        verify(conf);
    }
    */

    public void testHandlerInstantiation() {
        ObjectFactory factory = new ObjectFactory();
        HandlerType h5 = factory.createHandlerType();
        h5.setHandlerClass("javax.xml.ws.handler.Handler");
        h5.setHandlerName("interfaceHandler");

        HandlerChainType chain = factory.createHandlerChainType();
        List<HandlerType> handlers = chain.getHandler();
        handlers.add(h5);

        Configuration busConfiguration = createMock(Configuration.class);
        QName service = new QName("http://objectweb.org/hello_world_soap_http", "SOAP_Service");
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.bus.jaxws.configuration.types.ObjectFactory

Copyright © 2018 www.massapicom. 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.