Object faultPart = invocationFault;
// Should we use the class of the method signature here ?
fault.setObjectPart(faultMessageInfo.fieldPartName, faultPart);
fault.setName(faultMessageInfo.fieldMessageName);
if (faultMessageInfo.fieldMessageName != null) {
Fault wsdlFault = fieldBindingOperationModel.getOperation().getFault(faultMessageInfo.fieldMessageName);
if (wsdlFault != null) {
fault.setMessageDefinition(wsdlFault.getMessage());
}
}
operationSucceeded = false;
} else {
// Try to find a matching class:
Class invocationFaultClass = invocationFault.getClass();
Class tempClass = null;
Iterator it = faultMessageInfos.values().iterator();
boolean found = false;
while (it.hasNext()) {
faultMessageInfo = (FaultMessageInfo) it.next();
try {
tempClass =
Class.forName(
faultMessageInfo.fieldFormatType,
true,
Thread.currentThread().getContextClassLoader());
if (tempClass.isAssignableFrom(invocationFaultClass)) {
found = true;
Object faultPart = invocationFault;
// Should we use the class of the method signature here ?
fault.setObjectPart(faultMessageInfo.fieldPartName, faultPart);
fault.setName(faultMessageInfo.fieldMessageName);
if (faultMessageInfo.fieldMessageName != null) {
Fault wsdlFault = fieldBindingOperationModel.getOperation().getFault(faultMessageInfo.fieldMessageName);
if (wsdlFault != null) {
fault.setMessageDefinition(wsdlFault.getMessage());
}
}
operationSucceeded = false;
}
} catch (Exception exc) { // Nothing to do - just try the next one...