File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Web Services
Reply Bookmark ""Connection timed out" with HttpClient." Watch ""Connection timed out" with HttpClient." New topic
Author

"Connection timed out" with HttpClient.

Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
Hi,

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,


RR Kumaran
SCJP 1.4
Harish Madhavan
Greenhorn

Joined: Dec 10, 2003
Posts: 17
Kumran,
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

Harish
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: "Connection timed out" with HttpClient.
 
Similar Threads
Webdav
connection timed out with commons httpclient
Catalina.stop: java.net.ConnectException: Connection refused: connect
Junit in Linux m/c
I/0 exception in WebSphere 7.0