use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.
the class MapTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
tm = new DefaultTypeMapping();
creator = new Java5TypeCreator();
creator.setConfiguration(new TypeCreationOptions());
tm.setTypeCreator(creator);
}
use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.
the class AbstractEncodedTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
addNamespace("b", "urn:Bean");
addNamespace("a", "urn:anotherns");
addNamespace("xsi", Constants.URI_2001_SCHEMA_XSI);
addNamespace("soapenc", Soap11.getInstance().getSoapEncodingStyle());
AegisContext context = new AegisContext();
// create a different mapping than the context creates.
TypeMapping baseMapping = DefaultTypeMapping.createSoap11TypeMapping(true, false, false);
mapping = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD, baseMapping);
mapping.setTypeCreator(context.createTypeCreator());
context.setTypeMapping(mapping);
context.initialize();
// serialization root type
trailingBlocks = new TrailingBlocks();
}
use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.
the class CollectionTest method testCollectionDTO.
@Test
public void testCollectionDTO() {
tm = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD);
creator = new Java5TypeCreator();
creator.setConfiguration(new TypeCreationOptions());
tm.setTypeCreator(creator);
AegisType dto = creator.createType(CollectionDTO.class);
Set<AegisType> deps = dto.getDependencies();
AegisType type = deps.iterator().next();
assertTrue(type instanceof CollectionType);
CollectionType colType = (CollectionType) type;
deps = dto.getDependencies();
assertEquals(1, deps.size());
AegisType comType = colType.getComponentType();
assertEquals(String.class, comType.getTypeClass());
}
use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.
the class CollectionTest method setUp.
@Before
public void setUp() throws Exception {
super.setUp();
tm = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD);
creator = new Java5TypeCreator();
creator.setConfiguration(new TypeCreationOptions());
tm.setTypeCreator(creator);
}
use of org.apache.cxf.aegis.type.DefaultTypeMapping in project cxf by apache.
the class CollectionTest method testObjectDTO.
@Test
public void testObjectDTO() {
tm = new DefaultTypeMapping(Constants.URI_2001_SCHEMA_XSD);
creator = new Java5TypeCreator();
creator.setConfiguration(new TypeCreationOptions());
tm.setTypeCreator(creator);
AegisType dto = creator.createType(ObjectDTO.class);
Set<AegisType> deps = dto.getDependencies();
assertFalse(deps.isEmpty());
AegisType type = deps.iterator().next();
assertTrue(type instanceof CollectionType);
CollectionType colType = (CollectionType) type;
deps = dto.getDependencies();
assertEquals(1, deps.size());
AegisType comType = colType.getComponentType();
assertEquals(Object.class, comType.getTypeClass());
}
Aggregations