Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.ConduitInitiatorManager


           
            if (df != null) {
                transportId = df.getTransportIds().get(0);
            } else {
                //check conduits (the address could be supported on client only)
                ConduitInitiatorManager cim = getBus().getExtension(ConduitInitiatorManager.class);
                ConduitInitiator ci = cim.getConduitInitiatorForUri(getAddress());
                if (ci != null) {
                    transportId = ci.getTransportIds().get(0);
                }   
            }
        }
View Full Code Here


        } catch (Fault ex) {
            LOG.fine("Failure to prepare a message from conduit selector");
            if (ex.getCause() instanceof BusException) {
                String code = ((BusException)ex.getCause()).getCode();
                if ("NO_CONDUIT_INITIATOR".equals(code)) {
                    ConduitInitiatorManager cim = cfg.getBus().getExtension(ConduitInitiatorManager.class);
                    ClientOnlyHTTPTransportFactory factory = new ClientOnlyHTTPTransportFactory();
                    factory.setBus(cfg.getBus());                  
                    cim.registerConduitInitiator(
                        cfg.getConduitSelector().getEndpoint().getEndpointInfo().getTransportId(), factory);
                    cfg.getConduitSelector().prepare(message);
                } else {
                    throw ex;
                }
View Full Code Here

        localTransport.setUriPrefixes(new HashSet<String>(Arrays.asList("http", "local")));
        dfm.registerDestinationFactory(LocalTransportFactory.TRANSPORT_ID, localTransport);
        dfm.registerDestinationFactory("http://cxf.apache.org/transports/http", localTransport);
        dfm.registerDestinationFactory("http://cxf.apache.org/transports/http/configuration", localTransport);

        ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
        extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
        extension.registerConduitInitiator("http://cxf.apache.org/transports/http", localTransport);
        extension.registerConduitInitiator("http://cxf.apache.org/transports/http/configuration",
                                           localTransport);
    }
View Full Code Here

                transId = ei.getTransportId();
            }
        }
        ConduitInitiator conduitInit;
        try {
            ConduitInitiatorManager mgr = bus.getExtension(ConduitInitiatorManager.class);
            if (StringUtils.isEmpty(address) || address.startsWith("http") || address.startsWith("jms")) {
                conduitInit = mgr.getConduitInitiator(mapTransportURI(transId, address));
            } else {
                conduitInit = mgr.getConduitInitiatorForUri(address);
            }
            return conduitInit.getConduit(ei);
        } catch (BusException e) {
            throw new RuntimeException("Could not find conduit initiator for transport "
                                       + transId);
View Full Code Here

        dfm.registerDestinationFactory("http://cxf.apache.org/transports/jms", transport);
        dfm.registerDestinationFactory("http://cxf.apache.org/transports/http", transport);
       
        dfm.registerDestinationFactory(MuleUniversalTransport.TRANSPORT_ID, transport);

        ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
        try
        {
            // Force the HTTP transport to load if available, otherwise it could
            // overwrite our namespaces later
            extension.getConduitInitiator("http://schemas.xmlsoap.org/soap/http");
        }
        catch (BusException e1)
        {
            // If unavailable eat exception and continue
        }
        extension.registerConduitInitiator("http://cxf.apache.org/transports/http", transport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", transport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", transport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http/", transport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/http", transport);
        extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/http/", transport);
        extension.registerConduitInitiator("http://www.w3.org/2003/05/soap/bindings/HTTP/", transport);
        extension.registerConduitInitiator("http://cxf.apache.org/transports/http/configuration", transport);
        extension.registerConduitInitiator("http://cxf.apache.org/bindings/xformat", transport);
        extension.registerConduitInitiator("http://cxf.apache.org/transports/jms", transport);
        extension.registerConduitInitiator(MuleUniversalTransport.TRANSPORT_ID, transport);
       
        bus.getOutInterceptors().add(new MuleProtocolHeadersOutInterceptor());
        bus.getOutFaultInterceptors().add(new MuleProtocolHeadersOutInterceptor());

        if (enableMuleSoapHeaders)
View Full Code Here

    @PostConstruct
    void registerWithBindingManager() {
        if (null == bus) {
            return;
        }
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        if (null != cim && null != activationNamespaces) {
            for (String ns : activationNamespaces) {
                cim.registerConduitInitiator(ns, this);
            }
        }
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        if (null != dfm && null != activationNamespaces) {
            for (String ns : activationNamespaces) {
View Full Code Here

        CxfBeanTransportFactory transportFactory = new CxfBeanTransportFactory();
        transportFactory.setCxfBeanComponent(cxfBeanComponent);
        transportFactory.setBus(bus);
       
        // register the conduit initiator
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        cim.registerConduitInitiator(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);
       
        // register the destination factory
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        dfm.registerDestinationFactory(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);   
       
View Full Code Here

    public byte[] invokeBytes(String address, String transport, String message) throws Exception {
        EndpointInfo ei = new EndpointInfo(null, "http://schemas.xmlsoap.org/soap/http");
        ei.setAddress(address);

        ConduitInitiatorManager conduitMgr = getBus().getExtension(ConduitInitiatorManager.class);
        ConduitInitiator conduitInit = conduitMgr.getConduitInitiator(transport);
        Conduit conduit = conduitInit.getConduit(ei);

        TestMessageObserver obs = new TestMessageObserver();
        conduit.setMessageObserver(obs);
View Full Code Here

    }
    public byte[] invokeBytes(String address, String transport, byte[] message) throws Exception {
        EndpointInfo ei = new EndpointInfo(null, "http://schemas.xmlsoap.org/soap/http");
        ei.setAddress(address);

        ConduitInitiatorManager conduitMgr = getBus().getExtension(ConduitInitiatorManager.class);
        ConduitInitiator conduitInit = conduitMgr.getConduitInitiator(transport);
        Conduit conduit = conduitInit.getConduit(ei);

        TestMessageObserver obs = new TestMessageObserver();
        conduit.setMessageObserver(obs);
View Full Code Here

        CxfBeanTransportFactory transportFactory = new CxfBeanTransportFactory();
        transportFactory.setCxfBeanComponent(cxfBeanComponent);
        transportFactory.setBus(bus);
       
        // register the conduit initiator
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        cim.registerConduitInitiator(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);
       
        // register the destination factory
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        dfm.registerDestinationFactory(CxfBeanTransportFactory.TRANSPORT_ID, transportFactory);   
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.ConduitInitiatorManager

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.