}
*/
DataType targetFaultType = getFaultType(targetDataType);
if (targetFaultType == null) {
throw new ServiceRuntimeException("Target fault type cannot be resolved: " + targetDataType,
(Throwable)result);
// throw new TransformationException("Target fault type cannot be resolved: " + targetDataType);
}
// FIXME: How to match a source fault type to a target fault
// type?
DataType sourceDataType = null;
DataType sourceFaultType = null;
for (DataType exType : sourceOperation.getFaultTypes()) {
DataType faultType = getFaultType(exType);
// Match by the QName (XSD element) of the fault type
if (faultType != null && typesMatch(targetFaultType.getLogical(), faultType.getLogical())) {
sourceDataType = exType;
sourceFaultType = faultType;
break;
}
}
if (sourceFaultType == null) {
throw new ServiceRuntimeException("No matching source fault type is found: " + targetFaultType,
(Throwable)result);
// throw new TransformationException("No matching source fault type is found: " + targetFaultType);
}
Object newResult =