Sachin

Greenhorn
+ Follow
since Jan 09, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sachin

Thanks for the reply but it doesnt help as i put debug message right after the openConnection() command and it doesnt reach upto that.
Thanks anyway
Sachin
I get the above exception when I try to access the http url through my application.
Heres my chunk of code:
System.setProperty("ProxySet","true");
System.setProperty("ProxyHost","proxy.dlwc.nsw.gov.au");
System.setProperty("ProxyPort","8080");
String url="http://ids.lpi.nsw.gov.au/ipw/ipw-xml-link.php";
URL target=new URL(url);
conn = (HttpURLConnection)target.openConnection();
System.out.println("Response message = " + conn.getResponseMessage());
conn.setRequestMethod("POST");
conn.setAllowUserInteraction(true);
conn.setRequestProperty("content-type","text/xml");
conn.setDoInput(true);
conn.setDoOutput(true);
System.out.println(conn);
conn.connect();
And Heres the stack of error:

java.net.NoRouteToHostException: Operation timed out: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at sun.net.NetworkClient.doConnect(NetworkClient.java:50)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:331)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:517)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:267)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:277)
at sun.net.www.http.HttpClient.New(HttpClient.java:289)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:379)
at query.IPWLotQuery.getItems(IPWLotQuery.java:103)
at query.IPWLotQuery.doPost(IPWLotQuery.java:52)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)

Any help appreciated.