QName qname = new QName(detail.getNamespaceURI(),
detail.getName());
Class<?>[] exceptions = method.getExceptionTypes();
for (int i = 0; i < exceptions.length; i++) {
LOG.debug("Checking exception: " + exceptions[i]);
WebFault wf = exceptions[i].getAnnotation(WebFault.class);
if (wf == null) {
LOG.debug("No WebFault annotation");
continue;
}
QName exceptionName = new QName(wf.targetNamespace(), wf.name());
if (exceptionName.equals(qname)) {
try {
Method mth = exceptions[i].getMethod("getFaultInfo");
Class<?> infoClass = mth.getReturnType();
ByteArrayOutputStream baos = new ByteArrayOutputStream();