I am creating a client for the .net web service, but I have problems with how to pass the password correctly. Here is my hardcode example:
@Test public void exploratorySecurityTest() { String username = "user"; String password = "pwd"; UserStoryService service = new UserStoryService(); UserStoryServiceSoap port = service.getUserStoryServiceSoap();
}
What I really want to do is pass the password to the callback handler. The examples I saw in the CXF documentation implement a "hardcoded" callback (as in this example) or as a username function:
if (pc.getIdentifier().equals("user")) { pc.setPassword("pwd"); }
None of them meet my needs. Is there a way that I can do something like the following:
@Test public void exploratorySecurityTest() { String username = "user"; String password = "pwd"; UserStoryService service = new UserStoryService(); UserStoryServiceSoap port = service.getUserStoryServiceSoap();
source share