Search in sources :

Example 1 with NoDefaultConstructorBeanTypeRegistrar

use of org.apache.cxf.aegis.custom.types.NoDefaultConstructorBeanTypeRegistrar in project cxf by apache.

the class CustomBeansTest method testClientSetup.

// CXF-2093 reports an explosion with this case.
@Test
public void testClientSetup() throws Exception {
    JaxWsProxyFactoryBean clientFactory = new JaxWsProxyFactoryBean();
    clientFactory.setAddress("local:not-really");
    clientFactory.setServiceClass(Service.class);
    AegisDatabinding dataBinding = new AegisDatabinding();
    NoDefaultConstructorBeanTypeRegistrar beanRegistrar = new NoDefaultConstructorBeanTypeRegistrar();
    beanRegistrar.setDataBinding(dataBinding);
    beanRegistrar.register();
    NoDefaultConstructorBeanKeyTypeRegistrar beanKeyRegistrar = new NoDefaultConstructorBeanKeyTypeRegistrar();
    beanKeyRegistrar.setDataBinding(dataBinding);
    beanKeyRegistrar.register();
    clientFactory.setDataBinding(dataBinding);
    clientFactory.create();
    String uri = dataBinding.getAegisContext().getTypeMapping().getMappingIdentifierURI();
    assertNotSame(DefaultTypeMapping.DEFAULT_MAPPING_URI, uri);
}
Also used : JaxWsProxyFactoryBean(org.apache.cxf.jaxws.JaxWsProxyFactoryBean) NoDefaultConstructorBeanTypeRegistrar(org.apache.cxf.aegis.custom.types.NoDefaultConstructorBeanTypeRegistrar) AegisDatabinding(org.apache.cxf.aegis.databinding.AegisDatabinding) NoDefaultConstructorBeanKeyTypeRegistrar(org.apache.cxf.aegis.custom.types.NoDefaultConstructorBeanKeyTypeRegistrar) Test(org.junit.Test)

Aggregations

NoDefaultConstructorBeanKeyTypeRegistrar (org.apache.cxf.aegis.custom.types.NoDefaultConstructorBeanKeyTypeRegistrar)1 NoDefaultConstructorBeanTypeRegistrar (org.apache.cxf.aegis.custom.types.NoDefaultConstructorBeanTypeRegistrar)1 AegisDatabinding (org.apache.cxf.aegis.databinding.AegisDatabinding)1 JaxWsProxyFactoryBean (org.apache.cxf.jaxws.JaxWsProxyFactoryBean)1 Test (org.junit.Test)1