473,594 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem while calling a webservice using DNS name.

dmjpro
2,476 Top Contributor
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 3203
r035198x
13,262 MVP
Is the port you are tying to access on 10.29.33.96 open and accepting connections?
Feb 9 '09 #2
JosAH
11,448 Recognized Expert MVP
Try to ping that host (by name) and see if that IP address matches.

kind regards,

Jos
Feb 9 '09 #3
dmjpro
2,476 Top Contributor
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
4971
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 Parameter. I can call the first Method without Problems, the Parameter can be deserialized by the WebService. But if I want to call the second Method and give it an Array of Parameters, then the following exception is thrown by the WebService:...
7
3083
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 works fine. So I deploy the webservice on a remote machine (Linux box) and I get an error when calling the service. BUT: I can retrieve the WSDL and make a webreference in my VS.NET project, so obviously I (or more correct: My VS.NET project) am...
0
2712
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 System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object parameters)
2
2746
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" and return a complex type "FieldSearchResult". The error message as following : "Cannot assign object of type System.String to an object of type System.String. There is an error in XML document (23, 97)." By the way,I hava written a client in Java...
5
2700
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 services at ws.mycompany.com. We have properly installed the server certificate on the client machine. When the client try to connect to our secure webservice at https:\\ws.mycompany.com we have the foolwing error: System.Net.WebException: The...
5
19576
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 having a problem in the calling program. I searched online and found suggestions that I return an Array instead so I modified my code (below) to return an Array instead of an ArrayList. Now I get the message when I try to run just my webservice...
1
4028
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 provided with a set of Dll that implement the proxy needed to consume this web service. I'm now wrapping these dlls in a .Net webservice that can be consumed with Visual studio the familliar way.
2
4672
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 using.... ......................... Dim Connector As SoapConnector30 ' To connect to webservice Dim Serializer As SoapSerializer30 ' To serialize the XML data Dim Reader As SoapReader30 ' To read the Webservice response...
0
1311
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 using.... ........................ Dim Connector As SoapConnector30 ' To connect to webservice Dim Serializer As SoapSerializer30 ' To serialize the XML data Dim Reader As SoapReader30 ' To read the Webservice...
0
1729
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 works fine when called from a win32 app. The problem I am encountering is that the string being returned to the caller is in Chinese (No, I'm not kidding). (I need it to be in English). Background: The DLL uses 3 pchar parms, 2 in and one out. In...
0
7880
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8255
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8242
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6665
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5413
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3868
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3903
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.