try {
Method mth = exceptions[i].getMethod("getFaultInfo");
Class<?> infoClass = mth.getReturnType();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(baos);
new StaxSerializer().writeElement(detail, writer);
writer.close();
ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
JAXBElement<?> obj = JAXBContext.newInstance(infoClass).createUnmarshaller().unmarshal(new StreamSource(bais), infoClass);
Constructor<?> cst = exceptions[i].getConstructor(String.class, infoClass);
Exception e = (Exception) cst.newInstance(xfireFault.toString(), obj.getValue());