use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class ClassTest method startServer.
@Before
public void startServer() throws Exception {
AegisContext context = new AegisContext();
context.initialize();
context.getTypeMapping().register(new ClassAsStringType());
ServerFactoryBean b = new ServerFactoryBean();
b.setDataBinding(new AegisDatabinding(context));
b.setServiceClass(GenericsService.class);
b.setAddress("local://GenericsService");
server = b.create();
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class CollectionTestsWithService method before.
@Before
public void before() {
impl = new CollectionService();
createService(CollectionServiceInterface.class, impl, null);
ClientProxyFactoryBean proxyFac = new ClientProxyFactoryBean();
proxyFac.getServiceFactory().getServiceConfigurations().add(0, new XFireCompatibilityServiceConfiguration());
proxyFac.setDataBinding(new AegisDatabinding());
proxyFac.setAddress("local://CollectionServiceInterface");
proxyFac.setBus(getBus());
csi = proxyFac.create(CollectionServiceInterface.class);
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class AbstractAegisTest method createJaxwsService.
protected Server createJaxwsService(Class<?> serviceClass, Object serviceBean, String address, QName name) {
if (address == null) {
address = serviceClass.getSimpleName();
}
JaxWsServiceFactoryBean sf = new JaxWsServiceFactoryBean();
sf.setDataBinding(new AegisDatabinding());
JaxWsServerFactoryBean serverFactoryBean = new JaxWsServerFactoryBean();
serverFactoryBean.setServiceClass(serviceClass);
if (serviceBean != null) {
serverFactoryBean.setServiceBean(serviceBean);
}
serverFactoryBean.setAddress("local://" + address);
serverFactoryBean.setServiceFactory(sf);
if (name != null) {
serverFactoryBean.setEndpointName(name);
}
return serverFactoryBean.create();
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class AbstractAegisTest method setupAegis.
protected void setupAegis(AbstractWSDLBasedEndpointFactory sf, AegisDatabinding binding) {
if (binding == null) {
AegisContext context = new AegisContext();
if (enableJDOM) {
context.setEnableJDOMMappings(true);
}
binding = new AegisDatabinding();
// perhaps the data binding needs to do this for itself?
binding.setBus(BusFactory.getDefaultBus());
if (enableJDOM) {
// this preserves pre-2.1 behavior.
binding.setAegisContext(context);
}
}
sf.getServiceFactory().getServiceConfigurations().add(0, new XFireCompatibilityServiceConfiguration());
sf.getServiceFactory().setDataBinding(binding);
}
use of org.apache.cxf.aegis.databinding.AegisDatabinding in project cxf by apache.
the class ClientServiceConfigTest method before.
@Before
public void before() throws Exception {
super.setUp();
ReflectionServiceFactoryBean factory = new ReflectionServiceFactoryBean();
factory.setInvoker(new BeanInvoker(new EchoImpl()));
factory.setDataBinding(new AegisDatabinding());
ServerFactoryBean svrFac = new ServerFactoryBean();
svrFac.setAddress("local://Echo");
svrFac.setServiceFactory(factory);
svrFac.setServiceClass(Echo.class);
svrFac.setBus(getBus());
svrFac.create();
Endpoint endpoint = Endpoint.create(new EchoImpl());
impl = (EndpointImpl) endpoint;
impl.setDataBinding(new AegisDatabinding());
endpoint.publish("local://JaxWsEcho");
}
Aggregations