I’m trying to create a Web Service Client with Metro that uses WS-Security.
I have used Axis2, and to specify the username/password in an Axis2 client, I do:
org.apache.axis2.client.ServiceClient sc = stub._getServiceClient();
org.apache.axis2.client.Options options = sc.getOptions();
options.setUserName("USERNAME");
options.setPassword("PASSWORD");
How do I provide a username/password in a Metro client?
If you want to auth using basic http headers:
If the service uses
NTLM(Windows authentication) (explanation here):Haven’t used this myself, but seen other use it: