Examples of DestinationFactoryManager


Examples of org.apache.cxf.transport.DestinationFactoryManager

     * @param address the address
     * @return a Destination for the address
     */
    private Destination getDestination(Bus bus, String address, Message message) throws IOException {
        Destination destination = null;
        DestinationFactoryManager factoryManager =
            bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory factory =
            factoryManager.getDestinationFactoryForUri(address);
        if (factory != null) {
            Endpoint ep = message.getExchange().get(Endpoint.class);
           
            EndpointInfo ei = new EndpointInfo();
            ei.setName(new QName(ep.getEndpointInfo().getName().getNamespaceURI(),
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

    public void setUp() throws Exception {
        super.setUp();
        BusFactory bf = BusFactory.newInstance();
        //setup the camel transport for the bus
        bus = bf.createBus();
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        CamelTransportFactory camelTransportFactory = new CamelTransportFactory();
        //set the context here to the transport factory;
        camelTransportFactory.setCamelContext(context);
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        dfm.registerDestinationFactory(CamelTransportFactory.TRANSPORT_ID, camelTransportFactory);
        cim.registerConduitInitiator(CamelTransportFactory.TRANSPORT_ID, camelTransportFactory);
        BusFactory.setDefaultBus(bus);
        endpointInfo = new EndpointInfo();
    }
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

        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) {
                dfm.registerDestinationFactory(ns, this);
            }
        }
    }
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

        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) {
                dfm.registerDestinationFactory(ns, this);
            }
        }
    }
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

    protected EndpointInfo createEndpointInfo(Service service) throws BusException {
        String transportId = getTransportId();
        if (transportId == null && getAddress() != null) {
            DestinationFactory df = getDestinationFactory();
            if (df == null) {
                DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
                df = dfm.getDestinationFactoryForUri(getAddress());
                super.setDestinationFactory(df);
            }

            if (df != null) {
                transportId = df.getTransportIds().get(0);
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

                                            PortInfoImpl portInfo) throws BusException {
        EndpointInfo ei = null;              
        String address = portInfo.getAddress();
        String bindingID = BindingID.getBindingID(portInfo.getBindingID());
      
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        try {
            //the bindingId might be the transportId, just attempt to
            //load it to force the factory to load
            dfm.getDestinationFactory(bindingID);
        } catch (BusException ex) {
            //ignore
        }
        DestinationFactory df = dfm.getDestinationFactoryForUri(address);

        String transportId = null;
        if (df != null && df.getTransportIds() != null && !df.getTransportIds().isEmpty()) {
            transportId = df.getTransportIds().get(0);
        } else {
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

     * @param address the address
     * @return a Destination for the address
     */
    private Destination getDestination(Bus bus, String address, Message message) throws IOException {
        Destination destination = null;
        DestinationFactoryManager factoryManager =
            bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory factory =
            factoryManager.getDestinationFactoryForUri(address);
        if (factory != null) {
            Endpoint ep = message.getExchange().get(Endpoint.class);
           
            EndpointInfo ei = new EndpointInfo();
            ei.setName(new QName(ep.getEndpointInfo().getName().getNamespaceURI(),
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

     * @param address the address
     * @return a Destination for the address
     */
    private Destination getDestination(String address) throws IOException {
        Destination destination = null;
        DestinationFactoryManager factoryManager =
            bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory factory =
            factoryManager.getDestinationFactoryForUri(address);
        if (factory != null) {
            EndpointInfo ei = new EndpointInfo();
            ei.setAddress(address);
            destination = factory.getDestination(ei);
            decoupledObserver = new InterposedMessageObserver();
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

        this.bus = bus;
        this.bundle = bundle;
        List<String> ids = new ArrayList<String>();
        ids.add("http://schemas.xmlsoap.org/wsdl/soap/");

        DestinationFactoryManager destinationFactoryManager = bus
                .getExtension(DestinationFactoryManager.class);
        GeronimoDestinationFactory factory = new GeronimoDestinationFactory(bus);
        factory.setTransportIds(ids);

        destinationFactoryManager.registerDestinationFactory(
                "http://cxf.apache.org/transports/http/configuration", factory);
        destinationFactoryManager.registerDestinationFactory(
                "http://cxf.apache.org/bindings/xformat", factory);
        destinationFactoryManager.registerDestinationFactory(
                "http://www.w3.org/2003/05/soap/bindings/HTTP/", factory);
        destinationFactoryManager.registerDestinationFactory(
                "http://schemas.xmlsoap.org/soap/http", factory);
        destinationFactoryManager.registerDestinationFactory(
                "http://schemas.xmlsoap.org/wsdl/http/", factory);
        destinationFactoryManager.registerDestinationFactory(
                "http://schemas.xmlsoap.org/wsdl/soap/http", factory);

        endpoint = publishEndpoint(target);
        destination = (GeronimoDestination) endpoint.getServer().getDestination();
    }
View Full Code Here

Examples of org.apache.cxf.transport.DestinationFactoryManager

    protected EndpointInfo createEndpointInfo() throws BusException {
        if (transportId == null
            && getAddress() != null) {
            DestinationFactory df = getDestinationFactory();
            if (df == null) {
                DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
                df = dfm.getDestinationFactoryForUri(getAddress());
            }
           
            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);
                }   
            }
        }
       
        // Get the Service from the ServiceFactory if specified
        Service service = serviceFactory.getService();
        // SOAP nonsense
        BindingInfo bindingInfo = createBindingInfo();
        if (bindingInfo instanceof SoapBindingInfo
            && (((SoapBindingInfo) bindingInfo).getTransportURI() == null
            || LocalTransportFactory.TRANSPORT_ID.equals(transportId))) {
            ((SoapBindingInfo) bindingInfo).setTransportURI(transportId);
            transportId = "http://schemas.xmlsoap.org/wsdl/soap/";
        }
       
       
        if (transportId == null) {
            if (bindingInfo instanceof SoapBindingInfo) {
                // TODO: we shouldn't have to do this, but the DF is null because the
                // LocalTransport doesn't return for the http:// uris
                // People also seem to be supplying a null JMS getAddress(), which is worrying
                transportId = "http://schemas.xmlsoap.org/wsdl/soap/";               
            } else {
                transportId = "http://schemas.xmlsoap.org/wsdl/http/";
            }
        }
       
        service.getServiceInfos().get(0).addBinding(bindingInfo);

        setTransportId(transportId);
       
        if (destinationFactory == null) {
            DestinationFactoryManager dfm = getBus().getExtension(DestinationFactoryManager.class);
            destinationFactory = dfm.getDestinationFactory(transportId);
        }
       
        EndpointInfo ei;
        if (destinationFactory instanceof WSDLEndpointFactory) {
            ei = ((WSDLEndpointFactory)destinationFactory)
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.