try {
String fileName = getClass().getResource("/wsdl/atype.wsdl").toString();
generator.setWsdlFile(fileName);
generator.addInterfaceName("X");
Definition model = generator.generateCORBABinding();
Document document = writer.getDocument(model);
Element typemap = getElementNode(document, "corba:typeMapping");
assertNotNull(typemap);
assertEquals(3, typemap.getElementsByTagName("corba:anonsequence").getLength());
assertEquals(2, typemap.getElementsByTagName("corba:anonarray").getLength());
assertEquals(1, typemap.getElementsByTagName("corba:array").getLength());
assertEquals(2, typemap.getElementsByTagName("corba:struct").getLength());
TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
Map<String, CorbaTypeImpl> tmap = new HashMap<String, CorbaTypeImpl>();
for (CorbaTypeImpl type : mapType.getStructOrExceptionOrUnion()) {
tmap.put(type.getName(), type);
}