We have one webservice which invokes third party webservice. To test this implementation we have different environments.
Local Developer Machine: When we run the application, everything works fine and our webservice is able to hit the third party URL. (Local Machine uses Windows OS)
Local Development Server: After deploying the application on development server, we are not able to access the third party URL and get Http Proxy 407 error. (We are having Linux, with IBM J9 JVM.)
To get around this problem, we tried setting -Dhttps.proxyUser XXX -Dhttps.proxyPassword XXX
, but we continued to get the error. The second option we tried is using Authenticator.setDefault(new CustomImplAuthenticator())
. But surprisingly, the JVM didnt invoke getPasswordAuthentication
and continued to throw error.
We ran the same application again on local developer machine with authenticator.setdefault
code. We could access the URL as said earlier, but this time again JVM didnt invoke getPasswordAuthentication
method. After searching over net, we found that through NTLM the authentication data is resolved and hence we feel that the code is working on windows.
Can anyone let me know what settings, we should configure on application deployed in Linux box so that at least implementation assigned for Authenticator.setDefault
will be invoked.