• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

"Connection timed out" with HttpClient.

Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

My goal is to consume a web service using Apache AXIS. This web service uses Integrated Windows Authentication.

I use IE have configured Proxy server address and Proxy server port using IE's Tools -> Internet Options -> Connections Tab -> LAN Settings -> Proxy serer.

If type the webservice endpoint address of the form http://239.271.380.120/serveme/WS.asmx in my browser then I see in my browser "You are not authorized to view this page .. HTTP Error 401.2 - Unauthorized: Access is denied due to server configuration. Internet Information Services (IIS)" but there is another client in another network who is getting a login dialog to enter domain\\username and password when he types the web service endpoint address in the browser. This makes me think that either the so called another client is in the same domain as the web service provider and I am not.

Anway, I tried to write standalone HttpClient (I use commons-httpclient-3.0-rc3, commons-codec-1.3, commons-logging-1.0.4) program NTCredentialsClient.java like below :

In the above program, user1, password1, domain1 are details given by my service provider and
MYDESKTOP is my local machine name from which I am running the above program. 20.222.335.37
is my proxy server address and 3128 is my proxy server port. Now when I run the above
program I get this exception :

Can anyone please tell me whether the configurations I have made in my above client program are correct or is there anything that I am overlooking. Also, in the above program for AuthScope constructor, do I need to pass web service server adderss and port OR my local proxy address and local proxy port as constructor arguments ?
Please suggest ...

Thanks & Regards,
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As said, NTLM will not work if you have configured to hit via a proxy server.It should be on the same LAN.

Please go thru the Commons HTTP documentation http://jakarta.apache.org/commons/httpclient/authentication.html

Seriously? That's what you're going with? I prefer this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic