How to programmatically set STS username/password credentials?
How does one go about setting programmatically (as would be highly desirable in unit tests) the username/password creds for an STS. We are using an STS IssuedToken for our target web services and supporting java and .net clients. I've gotten things to work with wsit-client.xml and import of STS and target web service client WSDL usin predefined STS configuration but i can't seem to figure out how to use programmatic creds this way.
I would like to be able to use something like the following but I suspect the problem is that this port is not the right port. It should be the STS port which a typical client program doesn't reference.
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, username); ((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, password);