Package org.objectweb.celtix.transports

Examples of org.objectweb.celtix.transports.TransportFactoryManager


   
    public void testStart() throws Exception {

        GeronimoTransportFactory factory = new GeronimoTransportFactory();
       
        TransportFactoryManager tfm = mockBusFactory.getMock(TransportFactoryManager.class);
        assertNotNull("could not get TransportFactoryManager", tfm);
       
        tfm.getTransportFactory("http://schemas.xmlsoap.org/wsdl/soap/");
        EasyMock.expectLastCall().andReturn(factory);
        tfm.getTransportFactory("http://schemas.xmlsoap.org/wsdl/soap/http");
        EasyMock.expectLastCall().andReturn(factory);
        tfm.getTransportFactory("http://celtix.objectweb.org/transports/http/configuration");
        EasyMock.expectLastCall().andReturn(factory);
       
        mockBusFactory.replay();
       
        CeltixWebServiceContainer cntr = new CeltixWebServiceContainer(null);
View Full Code Here


        }
        return (TestClientTransport)transport;
    }
   
    protected ClientTransport createTransport(EndpointReferenceType ref) throws WSDLException, IOException {
        TransportFactoryManager tfm = bus.getTransportFactoryManager();
        String name = "http://celtix.objectweb.org/transports/test";
        TransportFactory tf = null;
        try {
            tf = tfm.getTransportFactory(name);
        } catch (BusException ex) {
            // ignore
        }
        if (tf == null) {
            tf = new TestTransportFactory();
            try {
                tfm.registerTransportFactory(name, tf);
            } catch (BusException ex) {
                System.out.println(ex.getMessage());
                return null;
            }
        }
View Full Code Here

        binding = new TestBinding(this);
    }
   
    protected ServerTransport createTransport(EndpointReferenceType ref)
        throws WSDLException, IOException {
        TransportFactoryManager tfm = bus.getTransportFactoryManager();
        String name = "http://celtix.objectweb.org/transports/test";
        TransportFactory tf = null;
        try {
            tf = tfm.getTransportFactory(name);
        } catch (BusException ex) {
            // ignore
        }
        if (tf == null) {
            tf = new TestTransportFactory();
            try {
                tfm.registerTransportFactory(name, tf);
            } catch (BusException ex) {
                System.out.println(ex.getMessage());
                return null;
            }
        }
View Full Code Here

        TransportFactoryManagerImpl transportFactoryManagerImpl = createTransportFactory();
        Map<String, Object> properties = new WeakHashMap<String, Object>();
        properties.put("celtix.TRANSPORTFACTORYMANAGER", transportFactoryManagerImpl);
        Bus bus = Bus.init(new String[0], properties);

        TransportFactoryManager transportFactoryManagerImplNew = bus.getTransportFactoryManager();

        //Verify that the TransportFactoryManager is the one we plugged into bus previously,
        //other than the one created inside Bus
        assertEquals("wsdlManager is the one we expected", transportFactoryManagerImpl,
            transportFactoryManagerImplNew);
View Full Code Here

       
        if (started) {
            return;
        }
       
        TransportFactoryManager tfm = getBus().getTransportFactoryManager();
        getTransportFactory().init(getBus());
        tfm.registerTransportFactory("http://schemas.xmlsoap.org/wsdl/soap/",
                factory);
        tfm.registerTransportFactory("http://schemas.xmlsoap.org/wsdl/soap/http",
                factory);
        tfm.registerTransportFactory("http://celtix.objectweb.org/transports/http/configuration",
                factory);
        started = true;
    }
View Full Code Here

        ClassNamespaceMappingListType mappings = of.createClassNamespaceMappingListType();
        ClassNamespaceMappingType mapping = of.createClassNamespaceMappingType();
        mapping.setClassname("org.objectweb.celtix.bus.transports.jms.JMSTransportFactory");
        mapping.getNamespace().add(transportId);
        mappings.getMap().add(mapping);
        TransportFactoryManager tfm = new TransportFactoryManagerImpl(bus);
        return tfm.getTransportFactory(transportId);
    }
View Full Code Here

        // check the transportFactoryManager create event
        checkBusCreatedEvent();
        EasyMock.replay(bus);
        EasyMock.replay(bc);

        TransportFactoryManager tfm = new TransportFactoryManagerImpl(bus);
        return (HTTPTransportFactory)tfm.getTransportFactory(transportId);
    }
View Full Code Here

TOP

Related Classes of org.objectweb.celtix.transports.TransportFactoryManager

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.