use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.
the class CxfProducerSynchronousFalseTest method startServer.
@BeforeClass
public static void startServer() throws Exception {
// start a simple front service
ServerFactoryBean svrBean = new ServerFactoryBean();
svrBean.setAddress(SIMPLE_SERVER_ADDRESS);
svrBean.setServiceClass(HelloService.class);
svrBean.setServiceBean(new HelloServiceImpl());
svrBean.setBus(BusFactory.getDefaultBus());
svrBean.create();
}
use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.
the class CxfProducerSynchronousTest method startServer.
@BeforeClass
public static void startServer() throws Exception {
// start a simple front service
ServerFactoryBean svrBean = new ServerFactoryBean();
svrBean.setAddress(SIMPLE_SERVER_ADDRESS);
svrBean.setServiceClass(HelloService.class);
svrBean.setServiceBean(new HelloServiceImpl());
svrBean.setBus(BusFactory.getDefaultBus());
svrBean.create();
}
use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.
the class FileToCxfMessageDataFormatTest method setUp.
@Override
public void setUp() throws Exception {
deleteDirectory("target/filetocxf");
// set CXF
ServerFactoryBean factory = new ServerFactoryBean();
factory.setAddress("http://localhost:" + port1 + "/FileToCxfMessageDataFormatTest/router");
factory.setServiceClass(HelloService.class);
factory.setServiceBean(new HelloServiceImpl());
server = factory.create();
server.start();
super.setUp();
}
use of org.apache.cxf.frontend.ServerFactoryBean in project dubbo by alibaba.
the class WebServiceProtocol method doExport.
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
String addr = url.getIp() + ":" + url.getPort();
HttpServer httpServer = serverMap.get(addr);
if (httpServer == null) {
httpServer = httpBinder.bind(url, new WebServiceHandler());
serverMap.put(addr, httpServer);
}
final ServerFactoryBean serverFactoryBean = new ServerFactoryBean();
serverFactoryBean.setAddress(url.getAbsolutePath());
serverFactoryBean.setServiceClass(type);
serverFactoryBean.setServiceBean(impl);
serverFactoryBean.setBus(bus);
serverFactoryBean.setDestinationFactory(transportFactory);
serverFactoryBean.create();
return new Runnable() {
public void run() {
serverFactoryBean.destroy();
}
};
}
use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.
the class CxfProducerRouterTest method startServer.
@BeforeClass
public static void startServer() throws Exception {
// start a simple front service
ServerFactoryBean svrBean = new ServerFactoryBean();
svrBean.setAddress(SIMPLE_SERVER_ADDRESS);
svrBean.setServiceClass(HelloService.class);
svrBean.setServiceBean(new HelloServiceImpl());
svrBean.setBus(BusFactory.getDefaultBus());
svrBean.create();
}
Aggregations