TestLogger.logger.debug("----------------------------------");
assertNotNull(exception);
Object fault = ((BaseFault_Exception)exception).getFaultInfo();
assertTrue(fault.getClass() == DerivedFault2.class);
DerivedFault2 df = (DerivedFault2) fault;
assertTrue(df.getA() == 2);
assertTrue(df.getB().equals("DerivedFault2"));
assertTrue(df.getC() == 2);
// Repeat to verify behavior
try{
exception = null;
// the invoke will throw an exception, if the test is performed right
int total = proxy.throwFault(2, "DerivedFault2", 2);
}catch(BaseFault_Exception e){
exception = e;
} catch (ComplexFault_Exception e) {
fail("Should not get ComplexFault_Exception in this testcase");
}
TestLogger.logger.debug("----------------------------------");
assertNotNull(exception);
fault = ((BaseFault_Exception)exception).getFaultInfo();
assertTrue(fault.getClass() == DerivedFault2.class);
df = (DerivedFault2) fault;
assertTrue(df.getA() == 2);
assertTrue(df.getB().equals("DerivedFault2"));
assertTrue(df.getC() == 2);
}