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);
}
}
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));
}
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;
}
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);
}
Aggregations