} catch (ComplexException ex) {
assertEquals("Throw user fault -3", ex.getMessage());
}
try {
Foo foo = new Foo();
foo.setNameIgnore("DoNoName");
port.modifyFoo(foo);
fail("Expected exception not found");
} catch (SOAPFaultException ex) {
assertTrue(ex.getMessage(), ex.getMessage().contains("NoName is not a valid name"));
}
try {
Foo foo = new Foo();
foo.setNameIgnore("NoName");
port.modifyFoo(foo);
fail("Expected exception not found");
} catch (SOAPFaultException ex) {
assertTrue(ex.getMessage().contains("NoName is not a valid name"));
}