title: 407 unable to tunnel through proxy
body: <p>We have one webservice which invokes third party webservice. To test this implementation we have different environments.</p>
  
  <ul>
  <li><p><strong>Local Developer Machine:</strong> When we run the application, everything works fine and our webservice is able to hit the third party URL. (Local Machine uses Windows OS)</p></li>
  <li><p><strong>Local Development Server:</strong> 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.)</p></li>
  </ul>
  
  <p>To get around this problem, we tried setting <code>-Dhttps.proxyUser XXX -Dhttps.proxyPassword XXX</code>, but we continued to get the error.  The second option we tried is using <code>Authenticator.setDefault(new CustomImplAuthenticator())</code>.  But surprisingly, the JVM didnt invoke <code>getPasswordAuthentication</code> and continued to throw error.</p>
  
  <p>We ran the same application again on local developer machine with <code>authenticator.setdefault</code> code. We could access the URL as said earlier, but this time again JVM didnt invoke <code>getPasswordAuthentication</code> 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.</p>
  
  <p>Can anyone let me know what settings, we should configure on application deployed in Linux box so that at least implementation assigned for <code>Authenticator.setDefault</code> will be invoked.</p>