TestLogger.logger.debug("----------------------------------");
assertNotNull(exception);
Object fault = ((BaseFault_Exception)exception).getFaultInfo();
assertSame(DerivedFault1.class, fault.getClass());
DerivedFault1 df = (DerivedFault1) fault;
assertEquals(2, df.getA());
assertEquals("DerivedFault1", df.getB());
// Repeat to verify behavior
try{
exception = null;
// the invoke will throw an exception, if the test is performed right
int total = proxy.throwFault(2, "DerivedFault1", 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(DerivedFault1.class, fault.getClass());
df = (DerivedFault1) fault;
assertEquals(2, df.getA());
assertEquals("DerivedFault1", df.getB());
}