*
* @param e the Exception at hang
* @return DispositionReport if one can be found, or null if it is not.
*/
public static DispositionReport getDispositionReport(Exception e) {
DispositionReport report = null;
if (e instanceof DispositionReportFaultMessage) {
DispositionReportFaultMessage faultMsg = (DispositionReportFaultMessage) e;
report = faultMsg.getFaultInfo();
} else if (e instanceof SOAPFaultException) {
SOAPFaultException soapFault = (SOAPFaultException) e;
Detail detail = soapFault.getFault().getDetail();
if (detail != null && detail.getFirstChild()!=null) {
try {
report = new DispositionReport(detail.getFirstChild());
} catch (JAXBException je) {
log.error("Could not unmarshall detail to a DispositionReport");
}
}
} else if (e instanceof UndeclaredThrowableException) {