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