TestLogger.logger.debug("----------------------------------");
assertNotNull(exception);
Object fault = ((BaseFault_Exception)exception).getFaultInfo();
assertSame(DerivedFault2.class, fault.getClass());
DerivedFault2 df = (DerivedFault2) fault;
assertEquals(2, df.getA());
assertEquals("DerivedFault2", df.getB());
assertEquals(2F, df.getC());
// 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();
assertSame(DerivedFault2.class, fault.getClass());
df = (DerivedFault2) fault;
assertEquals(2, df.getA());
assertEquals("DerivedFault2", df.getB());
assertEquals(2F, df.getC());
}