Search in sources :

Example 26 with ServerFactoryBean

use of org.apache.cxf.frontend.ServerFactoryBean in project cxf by apache.

the class SimpleFrontendTest method createServers.

@BeforeClass
public static void createServers() throws Exception {
    bus = BusFactory.getDefaultBus();
    ServerFactoryBean sf = new ServerFactoryBean();
    sf.setServiceBean(new WSSimpleImpl());
    sf.setAddress(add11);
    sf.setBus(bus);
    sf.create();
}
Also used : WSSimpleImpl(org.apache.cxf.systest.simple.impl.WSSimpleImpl) ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Example 27 with ServerFactoryBean

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();
}
Also used : ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Example 28 with ServerFactoryBean

use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.

the class CxfPayLoadMessageXmlBindingRouterTest method startService.

@BeforeClass
public static void startService() {
    //start a service
    ServerFactoryBean svrBean = new ServerFactoryBean();
    svrBean.setAddress(SERVICE_ADDRESS);
    svrBean.setServiceClass(HelloService.class);
    svrBean.setServiceBean(new HelloServiceImpl());
    svrBean.setBindingId(getBindingId());
    Server server = svrBean.create();
    server.start();
}
Also used : Server(org.apache.cxf.endpoint.Server) ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Example 29 with ServerFactoryBean

use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.

the class LoadDistributorFeatureTest method init.

@BeforeClass
public static void init() {
    // publish two web-service
    ServerFactoryBean factory1 = new ServerFactoryBean();
    factory1.setAddress(SERVICE_ADDRESS_1);
    factory1.setServiceBean(new HelloServiceImpl(" Server1"));
    factory1.create();
    ServerFactoryBean factory2 = new ServerFactoryBean();
    factory2.setAddress(SERVICE_ADDRESS_2);
    factory2.setServiceBean(new HelloServiceImpl(" Server2"));
    factory2.create();
}
Also used : ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Example 30 with ServerFactoryBean

use of org.apache.cxf.frontend.ServerFactoryBean in project camel by apache.

the class LoggingInterceptorInMessageModeTest method startService.

@BeforeClass
public static void startService() {
    //start a service
    ServerFactoryBean svrBean = new ServerFactoryBean();
    svrBean.setAddress(SERVICE_ADDRESS);
    svrBean.setServiceClass(HelloService.class);
    svrBean.setServiceBean(new HelloServiceImpl());
    server = svrBean.create();
}
Also used : ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) BeforeClass(org.junit.BeforeClass)

Aggregations

ServerFactoryBean (org.apache.cxf.frontend.ServerFactoryBean)48 Test (org.junit.Test)16 Server (org.apache.cxf.endpoint.Server)9 Before (org.junit.Before)9 BeforeClass (org.junit.BeforeClass)9 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)8 AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)6 QName (javax.xml.namespace.QName)5 JaxWsServiceFactoryBean (org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean)5 Service (org.apache.cxf.service.Service)5 Node (org.w3c.dom.Node)5 Bus (org.apache.cxf.Bus)4 ReflectionServiceFactoryBean (org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean)4 HashMap (java.util.HashMap)3 ServerImpl (org.apache.cxf.endpoint.ServerImpl)3 ClientProxyFactoryBean (org.apache.cxf.frontend.ClientProxyFactoryBean)3 BeanInvoker (org.apache.cxf.service.invoker.BeanInvoker)3 AbstractCXFTest (org.apache.cxf.test.AbstractCXFTest)3 ServiceWSDLBuilder (org.apache.cxf.wsdl11.ServiceWSDLBuilder)3 URL (java.net.URL)2