} catch (IOException e) {}
// Inspect each TypeEntry referenced in a Fault Message Part
String exceptionClassName = null;
for(int j=0; j < parts.size(); j++) {
TypeEntry te = ((Parameter)(parts.elementAt(j))).getType();
// If the TypeEntry is an element, advance to the type.
// This occurs if the message part uses the element= attribute
TypeEntry elementTE = null;
if (te instanceof Element) {
elementTE = te;
te = te.getRefType();
}
// Determine if the te should be processed using the
// simple type mapping or the complex type mapping
if (te.getBaseType() != null ||
te.isSimpleType()) {
// Simple Type Exception
} else {
// Complex Type Exception
Boolean isComplexFault = (Boolean) te.getDynamicVar(
JavaGeneratorFactory.COMPLEX_TYPE_FAULT);
if (isComplexFault == null ||
!isComplexFault.booleanValue()) {
// Mark the type as a complex type fault
te.setDynamicVar(
JavaGeneratorFactory.COMPLEX_TYPE_FAULT,
new Boolean(true));
if (elementTE != null) {
te.setDynamicVar(
JavaGeneratorFactory.COMPLEX_TYPE_FAULT,
new Boolean(true));
}
// Mark all derived types as Complex Faults
HashSet derivedSet =
org.apache.axis.wsdl.symbolTable.Utils.getDerivedTypes(
te, symbolTable);
Iterator derivedI = derivedSet.iterator();
while(derivedI.hasNext()) {
TypeEntry derivedTE = (TypeEntry)
derivedI.next();
derivedTE.setDynamicVar(
JavaGeneratorFactory.COMPLEX_TYPE_FAULT,
new Boolean(true));
}
// Mark all base types as Complex Faults
TypeEntry base = SchemaUtils.getComplexElementExtensionBase(
te.getNode(),
symbolTable);
while (base != null) {
base.setDynamicVar(
JavaGeneratorFactory.COMPLEX_TYPE_FAULT,
new Boolean(true));
base = SchemaUtils.getComplexElementExtensionBase(
base.getNode(),
symbolTable);
}
}
// The exception class name is the name of the type
exceptionClassName = te.getName();