Search in sources :

Example 36 with AegisDatabinding

use of org.apache.cxf.aegis.databinding.AegisDatabinding 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)

Example 37 with AegisDatabinding

use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.

the class DOMMappingTest method setUp.

@Before
public void setUp() throws Exception {
    super.setUp();
    createService(DocumentService.class, "DocService");
    ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
    ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
    factory.getServiceConfigurations().add(0, new org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration());
    proxyFac.setServiceFactory(factory);
    proxyFac.setDataBinding(new AegisDatabinding());
    proxyFac.setAddress("local://DocService");
    proxyFac.setBus(getBus());
    Object proxyObj = proxyFac.create(IDocumentService.class);
    docClient = (IDocumentService) proxyObj;
    Client client = ClientProxy.getClient(proxyObj);
    ClientImpl clientImpl = (ClientImpl) client;
    clientImpl.setSynchronousTimeout(1000000000);
}
Also used : ClientProxyFactoryBean(org.apache.cxf.frontend.ClientProxyFactoryBean) ClientImpl(org.apache.cxf.endpoint.ClientImpl) AegisDatabinding(org.apache.cxf.aegis.databinding.AegisDatabinding) Client(org.apache.cxf.endpoint.Client) ReflectionServiceFactoryBean(org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean) Before(org.junit.Before)

Aggregations

AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)37 Test (org.junit.Test)21 JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)14 ClientProxyFactoryBean (org.apache.cxf.frontend.ClientProxyFactoryBean)12 AbstractAegisTest (org.apache.cxf.aegis.AbstractAegisTest)10 LoggingInInterceptor (org.apache.cxf.ext.logging.LoggingInInterceptor)7 LoggingOutInterceptor (org.apache.cxf.ext.logging.LoggingOutInterceptor)7 Before (org.junit.Before)7 ServerFactoryBean (org.apache.cxf.frontend.ServerFactoryBean)6 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)5 AegisContext (org.apache.cxf.aegis.AegisContext)4 Server (org.apache.cxf.endpoint.Server)4 BeanInvoker (org.apache.cxf.service.invoker.BeanInvoker)4 HashSet (java.util.HashSet)3 ReflectionServiceFactoryBean (org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean)3 QName (javax.xml.namespace.QName)2 XFireCompatibilityServiceConfiguration (org.apache.cxf.aegis.databinding.XFireCompatibilityServiceConfiguration)2 AuthService (org.apache.cxf.authservice.AuthService)2 Authenticate (org.apache.cxf.authservice.Authenticate)2 Service (org.apache.cxf.service.Service)2