Package org.objectweb.celtix.transports

Examples of org.objectweb.celtix.transports.TransportFactory


    public void loadTransportFactory(String classname, String ... namespaces) throws BusException {
        try {
            Class<? extends TransportFactory> clazz =
                Class.forName(classname).asSubclass(TransportFactory.class);
           
            TransportFactory factory = clazz.newInstance();
            factory.init(bus);
            for (String namespace : namespaces) {
                registerTransportFactory(namespace, factory);
            }
        } catch (ClassNotFoundException e) {
            throw new BusException(e);
View Full Code Here


        }
        try {
            if (null == bus) {
                bus = Bus.init(list.toArray(new String[list.size()]));

                TransportFactory factory = createServletTransportFactory();
                factory.init(bus);
                registerTransport(factory, "http://schemas.xmlsoap.org/wsdl/soap/");
                registerTransport(factory, "http://schemas.xmlsoap.org/wsdl/soap/http");
                registerTransport(factory, "http://schemas.xmlsoap.org/wsdl/http/");
                registerTransport(factory, "http://celtix.objectweb.org/bindings/xmlformat");
                registerTransport(factory, "http://celtix.objectweb.org/transports/http/configuration");
View Full Code Here

    }
   
    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;
            }
        }
        return tf.createClientTransport(ref, this);
    }
View Full Code Here

   
    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;
            }
        }
        return tf.createServerTransport(ref);
    }
View Full Code Here

        String address = "jms:ConnectionFactory#" + jndiDestinationName;
        URL wsdlUrl = getClass().getResource("/wsdl/jms_test.wsdl");
        assertNotNull(wsdlUrl);

        createConfiguration(wsdlUrl, serviceName, portName);
        TransportFactory factory = createTransportFactory();

        ServerTransport server = createServerTransport(factory, wsdlUrl, serviceName,
                                                       portName, address);
        setupCallbackObject(useAutomaticWorkQueue);
View Full Code Here

        String address = "jms:ConnectionFactory#" + jndiDestinationName;
        URL wsdlUrl = getClass().getResource("/wsdl/jms_test.wsdl");
        assertNotNull(wsdlUrl);

        createConfiguration(wsdlUrl, serviceName, portName);
        TransportFactory factory = createTransportFactory();
        setupOneWayCallbackObject(useAutomaticWorkQueue);

        ServerTransport server = createServerTransport(factory, wsdlUrl, serviceName,
                                                       portName, address);
View Full Code Here

            port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);
            List<?> exts = port.getExtensibilityElements();
            if (exts.size() > 0) {
                ExtensibilityElement el = (ExtensibilityElement)exts.get(0);

                TransportFactory factory = bus.getTransportFactoryManager()
                    .getTransportFactory(el.getElementType().getNamespaceURI());
                ret = factory.createClientTransport(ref, this);
            }
        } catch (BusException ex) {
            LOG.severe("TRANSPORT_FACTORY_RETREIVAL_FAILURE_MSG");
        }
        assert ret != null;
View Full Code Here

        try {
            Port port = EndpointReferenceUtils.getPort(bus.getWSDLManager(), ref);
            List<?> exts = port.getExtensibilityElements();
            if (exts.size() > 0) {               
                ExtensibilityElement el = (ExtensibilityElement)exts.get(0);
                TransportFactory tf =
                    bus.getTransportFactoryManager().
                        getTransportFactory(el.getElementType().getNamespaceURI());
                return tf.createServerTransport(ref);
            }
        } catch (BusException ex) {
            LOG.severe("TRANSPORT_FACTORY_RETRIEVAL_FAILURE_MSG");
        }
        return null;
View Full Code Here

TOP

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

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.