Search in sources :

Example 1 with HTTPConduitFactory

use of org.apache.cxf.transport.http.HTTPConduitFactory in project jbossws-cxf by jbossws.

the class HTTPConduitTestCase method testDefaultWrapperInstalled.

@Test
@RunAsClient
public void testDefaultWrapperInstalled() throws Exception {
    Bus bus = BusFactory.newInstance().createBus();
    try {
        HTTPConduitFactory hcf = bus.getExtension(HTTPConduitFactory.class);
        assertNotNull(hcf);
        assertTrue(hcf instanceof DefaultHTTPConduitFactoryWrapper);
        URL wsdlURL = new URL(baseURL + "/ServiceOne" + "?wsdl");
        Service service = Service.create(wsdlURL, new QName("http://org.jboss.ws.jaxws.cxf/httpConduit", "ServiceOne"));
        EndpointOne port = service.getPort(new QName("http://org.jboss.ws.jaxws.cxf/httpConduit", "EndpointOnePort"), EndpointOne.class);
        assertEquals("Foo", port.echo("Foo"));
    } finally {
        bus.shutdown(true);
    }
}
Also used : Bus(org.apache.cxf.Bus) HTTPConduitFactory(org.apache.cxf.transport.http.HTTPConduitFactory) QName(javax.xml.namespace.QName) Service(javax.xml.ws.Service) URL(java.net.URL) DefaultHTTPConduitFactoryWrapper(org.jboss.wsf.stack.cxf.client.configuration.DefaultHTTPConduitFactoryWrapper) RunAsClient(org.jboss.arquillian.container.test.api.RunAsClient) Test(org.junit.Test) JBossWSTest(org.jboss.wsf.test.JBossWSTest)

Example 2 with HTTPConduitFactory

use of org.apache.cxf.transport.http.HTTPConduitFactory in project cxf by apache.

the class NettyHttpConduitFactoryTest method testLoadingHttpConduitFactory.

@Test
public void testLoadingHttpConduitFactory() throws Exception {
    bus = BusFactory.getDefaultBus(true);
    assertNotNull("Cannot get bus", bus);
    // Make sure we got the Transport Factory.
    HTTPConduitFactory factory = bus.getExtension(HTTPConduitFactory.class);
    assertNotNull("Cannot get HTTPConduitFactory", factory);
    assertTrue(NettyHttpConduitFactory.class.isInstance(factory));
}
Also used : HTTPConduitFactory(org.apache.cxf.transport.http.HTTPConduitFactory) Test(org.junit.Test)

Example 3 with HTTPConduitFactory

use of org.apache.cxf.transport.http.HTTPConduitFactory in project jbossws-cxf by jbossws.

the class HTTPConduitTestCase method replaceWrapper.

private DefaultHTTPConduitFactoryWrapper replaceWrapper(Map<String, Object> args, Bus bus) {
    HTTPConduitFactory hcf = bus.getExtension(HTTPConduitFactory.class);
    // replace wrapper
    DefaultHTTPConduitFactoryWrapper w = new DefaultHTTPConduitFactoryWrapper(args, false, ((AbstractHTTPConduitFactoryWrapper) hcf).getDelegate());
    bus.setExtension(w, HTTPConduitFactory.class);
    return w;
}
Also used : HTTPConduitFactory(org.apache.cxf.transport.http.HTTPConduitFactory) DefaultHTTPConduitFactoryWrapper(org.jboss.wsf.stack.cxf.client.configuration.DefaultHTTPConduitFactoryWrapper)

Example 4 with HTTPConduitFactory

use of org.apache.cxf.transport.http.HTTPConduitFactory in project jbossws-cxf by jbossws.

the class DefaultHTTPConduitFactoryWrapper method install.

public static void install(Bus bus) {
    HTTPConduitFactory delegate = bus.getExtension(HTTPConduitFactory.class);
    bus.setExtension(new DefaultHTTPConduitFactoryWrapper(delegate), HTTPConduitFactory.class);
}
Also used : HTTPConduitFactory(org.apache.cxf.transport.http.HTTPConduitFactory)

Aggregations

HTTPConduitFactory (org.apache.cxf.transport.http.HTTPConduitFactory)4 DefaultHTTPConduitFactoryWrapper (org.jboss.wsf.stack.cxf.client.configuration.DefaultHTTPConduitFactoryWrapper)2 Test (org.junit.Test)2 URL (java.net.URL)1 QName (javax.xml.namespace.QName)1 Service (javax.xml.ws.Service)1 Bus (org.apache.cxf.Bus)1 RunAsClient (org.jboss.arquillian.container.test.api.RunAsClient)1 JBossWSTest (org.jboss.wsf.test.JBossWSTest)1