473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Problem while calling a webservice using DNS name.

dmjpro
2,476 2GB
Have a look at my problem.
Expand|Select|Wrap|Line Numbers
  1. try{
  2.                 //String tokenLocatorUrl = "http://erp.iitkgp.ernet.in:80/SSO_Token_Object_locator/resources/getSSOToken";
  3.                 String tokenLocatorUrl = "http://10.29.33.96:80/SSO_Token_Object_locator/resources/getSSOToken";
  4.                 String file = "/APP/tomcat/apache-tomcat-6.0.14/webapps/SSOAdministration/WEB-INF/persistance/sso/9C148798C559E03C4E3EF20E9CE02485.worker2.obj";
  5.                 NameValuePair[] data = {new NameValuePair("Path", file)};
  6.                 HttpClient client = new HttpClient();
  7.                 HttpMethod method = new GetMethod(tokenLocatorUrl);
  8.                 method.setQueryString(data);
  9.                 int status_code = client.executeMethod(method);
  10.                 if(status_code != HttpStatus.SC_OK) out.println("Error!!!!");
  11.                 else out.println("Yahoo!!!!");
  12.             }catch(Exception e){
  13.                 e.printStackTrace(System.out);
  14.             }
  15.  
I am using commons-codec-1.3.jar, commons-httpclient-3.1.jar and commons-logging.jar three jar files.Now the code is running OK. And the web service also running OK.
Whenever i try to execute this code using domain name of 10.29.33.96 then it says ..
Expand|Select|Wrap|Line Numbers
  1. java.net.ConnectException: Connection refused: connect
  2.         at java.net.PlainSocketImpl.socketConnect(Native Method)
  3.         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  4.         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  5.         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  6.         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
  7.         at java.net.Socket.connect(Socket.java:519)
  8.         at java.net.Socket.connect(Socket.java:469)
  9.         at java.net.Socket.<init>(Socket.java:366)
  10.         at java.net.Socket.<init>(Socket.java:239)
  11.         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
  12.         at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
  13.         at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
  14.         at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
  15.         at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
  16.         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
  17.         at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
  18.         at org.apache.jsp.index_jsp._jspService(index_jsp.java:81)
  19.         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  20.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  21.         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
  22.         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
  23.         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
  24.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  25.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  26.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  27.         at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
  28.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  29.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  30.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  31.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  32.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  33.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  34.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  35.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
  36.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  37.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
  38.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  39.         at java.lang.Thread.run(Thread.java:619)
  40.  
Why is it happening?
Feb 9 '09 #1
3 3183
r035198x
13,262 8TB
Is the port you are tying to access on 10.29.33.96 open and accepting connections?
Feb 9 '09 #2
JosAH
11,448 Expert 8TB
Try to ping that host (by name) and see if that IP address matches.

kind regards,

Jos
Feb 9 '09 #3
dmjpro
2,476 2GB
Both of you thanks :)
But when i send a plain request through the DNS name it's working at port 80.
But whenever the web service call made then it's not working.
Feb 10 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
0
by: Fahad | last post by:
Hi, I am trying to update a list on sharepoint server via calling its standard built in web service. When ever i call the UpdateListitems() method, I get the following exception: at...
2
by: yqlu | last post by:
I hava developed a client in C# that is connected to a 3-party XML Web Services developed in Java based on the AXIS 1.1. Most methods call are successful except for one method named "findObjects"...
5
by: Dany C. | last post by:
We have install a valid SSL certificate issued to www.mycompany.com on our web server running IIS 6.0 / win2003 SP1. Then we have created a sub domain pointing to the same server for our web...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
1
by: jens Jensen | last post by:
Hello , i'm calling a webservice generated with oracle webservice java tools. I'm not able to add a web reference to a .net client the usual way with visual studio 2005. I was therefore...
2
by: rakesh kumawat | last post by:
I am facing a problem while reading the result which is loaded in DOMDocument. In which I am sending a request to web service and getting a record of Single Order. This is my VB Code which is i am...
0
by: rakeshkumawat | last post by:
I am facing a problem while reading the result which is loaded in DOMDocument. In which I am sending a request to web service and getting a record of Single Order. This is my VB Code which is i am...
0
by: BornTOCode | last post by:
Hello, I am attempting to call a (Delphi) win32 DLL from a Delphi.Net webservice. I am using a slightly modified version of the hello world webservice that comes with Delphi 2006. The DLL...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.