Package org.apache.cxf.transport

Examples of org.apache.cxf.transport.DestinationFactoryManager


        EndpointInfo info = getEndpointInfo("bla", "Foo", "http://localhost:9000");
       
        Bus bus = (Bus) ctx.getBean(Bus.DEFAULT_BUS_ID);
        bus.setExtension(cfg, Configurer.class);
       
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory factory = dfm.getDestinationFactory("http://cxf.apache.org/transports/http");
        Destination d = factory.getDestination(info);
        assertTrue(d instanceof JettyHTTPDestination);
        JettyHTTPDestination jd = (JettyHTTPDestination) d;       
        assertEquals("foobar", jd.getServer().getContentEncoding());  
       
View Full Code Here


    }

    private void unregisterServStatic(String add) throws Exception {
        Bus bus = getBus();
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory df = dfm
            .getDestinationFactory("http://cxf.apache.org/transports/http/configuration");

        EndpointInfo ei = new EndpointInfo();
        ei.setAddress(add);
View Full Code Here

     * Serve static file
     */
    private void servStatic(final URL resource,
                                   final String add) throws Exception {
        Bus bus = getBus();
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        DestinationFactory df = dfm
            .getDestinationFactory("http://cxf.apache.org/transports/http/configuration");

        EndpointInfo ei = new EndpointInfo();
        ei.setAddress(add);

View Full Code Here

        bus = BusFactory.getDefaultBus(true);
       
        assertNotNull("Cannot get bus", bus);
       
        // Make sure we got the Transport Factory.
        DestinationFactoryManager destFM =
            bus.getExtension(DestinationFactoryManager.class);
        assertNotNull("Cannot get DestinationFactoryManager", destFM);
        DestinationFactory destF =
            destFM.getDestinationFactory(
                    "http://cxf.apache.org/transports/http");
        assertNotNull("No DestinationFactory", destF);
        assertTrue(HTTPTransportFactory.class.isInstance(destF));

        // And the JettyHTTPServerEngineFactory should be there.
View Full Code Here

        Bus bus = new SpringBusFactory().createBus();
        assertNotNull(bus);
       
        checkBindingExtensions(bus);
       
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        assertNotNull("No destination factory manager", dfm);
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        assertNotNull("No conduit initiator manager", cim);
       
        checkTransportFactories(bus);
View Full Code Here

        assertNotNull("conduit initiator not available",
                      cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/http/"));
        assertNotNull("conduit initiator not available",
                      cim.getConduitInitiator("http://cxf.apache.org/transports/http/configuration"));
       
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        assertNotNull("No destination factory manager", dfm);
       
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/"));
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http"));
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://schemas.xmlsoap.org/wsdl/http/"));
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration"));
    }
View Full Code Here

        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://cxf.apache.org/transports/http/configuration"));
    }
   
    private void checkTransportFactories(Bus bus) throws BusException {
        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
        assertNotNull("No destination factory manager", dfm);
        ConduitInitiatorManager cim = bus.getExtension(ConduitInitiatorManager.class);
        assertNotNull("No conduit initiator manager", cim);
       
        try {
            cim.getConduitInitiator("http://cxf.apache.org/unknown");
        } catch (BusException ex) {
            // expected
        }
     
        try {
            dfm.getDestinationFactory("http://cxf.apache.org/unknown");
        } catch (BusException ex) {
            // expected
        }      
       
        // not sure that we need this - Dan Diephouse
        //assertNotNull("conduit initiator not available",
        //cim.getConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/"));
        
       
        assertNotNull("conduit initiator not available",
                      cim.getConduitInitiator("http://cxf.apache.org/transports/http"));
        assertNotNull("conduit initiator not available",
                      cim.getConduitInitiator("http://cxf.apache.org/transports/jms"));
        assertNotNull("conduit initiator not available",
                      cim.getConduitInitiator("http://cxf.apache.org/transports/jms/configuration"));
       
       

        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://cxf.apache.org/transports/http"));
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://cxf.apache.org/transports/jms"));
        assertNotNull("destination factory not available",
                      dfm.getDestinationFactory("http://cxf.apache.org/transports/jms/configuration"));
       
    }
View Full Code Here

                                            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

                                            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

        Definition def = wsdlReader.readWSDL(new WSDLLocatorImpl(wsdlUrl));

        IMocksControl control = EasyMock.createNiceControl();
        Bus bus = control.createMock(Bus.class);
        BindingFactoryManager bindingFactoryManager = control.createMock(BindingFactoryManager.class);
        DestinationFactoryManager dfm = control.createMock(DestinationFactoryManager.class);
        WSDLServiceBuilder wsdlServiceBuilder = new WSDLServiceBuilder(bus);

        Service service = null;
        for (Iterator<?> it = def.getServices().values().iterator(); it.hasNext();) {
            Object obj = it.next();
View Full Code Here

TOP

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

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.