assertValid("//detail/f:AuthenticationFault/f:message[text()='Invalid username/password']", response);
}
public void testClient() throws Exception
{
XFireProxyFactory factory = new XFireProxyFactory(getXFire());
AuthService echo = (AuthService) factory.create(service, "xfire.local://AuthService");
try
{
echo.authenticate("yo", "yo");
fail("Should have thrown custom fault.");
}
catch (AuthenticationFault_Exception fault)
{
assertEquals("Invalid username/password", fault.getFaultInfo().getMessage());
assertEquals("message", fault.getMessage());
}
echo = (AuthService) factory.create(soap12Binding, "xfire.local://AuthService");
try
{
echo.authenticate("yo", "yo");
fail("Should have thrown custom fault.");