NTLM Authentication
The PPM Web service client can also be programmed to pass NTLM credentials.
The following example illustrates how to pass NTLM credentials:
public static void setNTLMAuthHeader(Stub stub, String domain, String username, String password, String host) { Options options = stub._getServiceClient().getOptions(); if (options == null) return; HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); List schemes = new ArrayList();
schemes.add(HttpTransportProperties.Authenticator.NTLM); auth.setAuthSchemes(schemes); auth.setPreemptiveAuthentication(true); auth.setUsername(username); auth.setPassword(password); auth.setDomain(domain); auth.setHost(host); options.setProperty(HTTPConstants.AUTHENTICATE, auth); stub._getServiceClient().setOptions(options); }