Search in sources :

Example 46 with ServerFactoryBean

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

the class AbstractAegisTest method createServiceFactory.

protected ServerFactoryBean createServiceFactory(Class<?> serviceClass, Object serviceBean, String address, QName name, AegisDatabinding binding) {
    ServerFactoryBean sf = new ServerFactoryBean();
    sf.setServiceClass(serviceClass);
    if (serviceBean != null) {
        sf.setServiceBean(serviceBean);
    }
    sf.getServiceFactory().setServiceName(name);
    sf.setAddress("local://" + address);
    setupAegis(sf, binding);
    return sf;
}
Also used : ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Example 47 with ServerFactoryBean

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

the class ExceptionInheritanceTest method createServiceFactory.

@Override
protected ServerFactoryBean createServiceFactory(Class<?> serviceClass, Object serviceBean, String address, QName name, AegisDatabinding b) {
    ServerFactoryBean sf = super.createServiceFactory(serviceClass, serviceBean, address, name, b);
    sf.getServiceFactory().setProperties(props);
    return sf;
}
Also used : ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean)

Example 48 with ServerFactoryBean

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

the class InheritancePOJOTest method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    ServerFactoryBean sf = createServiceFactory(InheritanceService.class, null, "InheritanceService", new QName("urn:xfire:inheritance", "InheritanceService"), null);
    AegisContext globalContext = new AegisContext();
    globalContext.setWriteXsiTypes(true);
    Set<String> l = new HashSet<>();
    l.add(Employee.class.getName());
    globalContext.setRootClassNames(l);
    AegisDatabinding binding = new AegisDatabinding();
    binding.setAegisContext(globalContext);
    sf.getServiceFactory().setDataBinding(binding);
    sf.create();
}
Also used : QName(javax.xml.namespace.QName) AegisContext(org.apache.cxf.aegis.AegisContext) ServerFactoryBean(org.apache.cxf.frontend.ServerFactoryBean) AegisDatabinding(org.apache.cxf.aegis.databinding.AegisDatabinding) HashSet(java.util.HashSet) Before(org.junit.Before)

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