try {
String fileName = getClass().getResource("/wsdl/TypeInheritance.wsdl").toString();
generator.setWsdlFile(fileName);
generator.addInterfaceName("TypeInheritancePortType");
Definition model = generator.generateCORBABinding();
Document document = writer.getDocument(model);
Element typemap = getElementNode(document, "corba:typeMapping");
assertNotNull(typemap);
assertEquals(3, typemap.getElementsByTagName("corba:union").getLength());
assertEquals(1, typemap.getElementsByTagName("corba:anonstring").getLength());
assertEquals(17, typemap.getElementsByTagName("corba:struct").getLength());
TypeMappingType mapType = (TypeMappingType)model.getExtensibilityElements().get(0);
WSDLToIDLAction idlgen = new WSDLToIDLAction();
idlgen.setBindingName("TypeInheritanceCORBABinding");
idlgen.setOutputFile("typeInherit.idl");
idlgen.generateIDL(model);