if (cls == FaultException.class) {
return true;
}
DataType faultType = (DataType)exceptionType.getLogical();
Class<?> faultBean = null;
final WebFault fault = cls.getAnnotation(WebFault.class);
if (fault != null) {
if (!"".equals(fault.name()) || !"".equals(fault.targetNamespace())) {
QName faultQName = ((XMLType)faultType.getLogical()).getElementName();
String faultNS =
"".equals(fault.targetNamespace()) ? faultQName.getNamespaceURI() : fault.targetNamespace();
String faultLocal = "".equals(fault.name()) ? faultQName.getLocalPart() : fault.name();
faultName = new QName(faultNS, faultLocal);
XMLType xmlType = new XMLType(faultName, null);
faultType.setLogical(xmlType);
}
if (!"".equals(fault.faultBean())) {
faultBean = AccessController.doPrivileged(new PrivilegedAction<Class<?>>() {
public Class<?> run() {
try {
return Class.forName(fault.faultBean(), false, cls.getClassLoader());
} catch (ClassNotFoundException e) {
throw new ServiceRuntimeException(e);
}
}
});