"org/apache/cxf/systest/ws/policy/client/javafirstclient.xml");
SslUsernamePasswordAttachmentService svc = ctx.getBean("SslUsernamePasswordAttachmentServiceClient",
SslUsernamePasswordAttachmentService.class);
WSS4JOutInterceptor wssOut = addToClient(svc);
// just some basic sanity tests first to make sure that auth is working where password is provided.
wssOut.setProperties(getPasswordProperties("alice", "password"));
svc.doSslAndUsernamePasswordPolicy();
wssOut.setProperties(getPasswordProperties("alice", "passwordX"));
try {
svc.doSslAndUsernamePasswordPolicy();
fail("Expected authentication failure");
} catch (Exception e) {
assertTrue(true);
}
wssOut.setProperties(getNoPasswordProperties("alice"));
try {
svc.doSslAndUsernamePasswordPolicy();
fail("Expected authentication failure");
} catch (Exception e) {