This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes java.net.UnknownHostException when calling a web service from Java client Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "java.net.UnknownHostException when calling a web service from Java client" Watch "java.net.UnknownHostException when calling a web service from Java client" New topic
Author

java.net.UnknownHostException when calling a web service from Java client

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

I have access to a WSDL which I can open in a web browser. I generated Java proxy/stub using axis2 runtime(I am using Eclipse IDE with axis plugin). I am trying to connect to this web service using this proxy. I pass the URL mentioned in <soap:address location>child of <wsdl:port binding>element of the WSDL file. But when I run my code, I get UnknownHostException.

How do I know which URL to use to call the service?

Please help..

Thanks.


[List of FAQs] | [Android FAQ] | [My Blog] | [Samuh Varta]
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

Could the fact that I am executing this code from behind a firewall be causing a problem?

If I am not mistaken we should be able to invoke the web service using the Hardcoded URL(EPR) in the wsdl:service element of the WSDL file. Are there any alternatives to this?
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1365

I found the problem. This was because of the firewall.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: java.net.UnknownHostException when calling a web service from Java client
 
Similar Threads
unable to run tcpmon
Axis2 wizard problems in eclipse
want to send pdf file to client from server. pdf is generated at server
Doubt regarding invocation of JAX-WS through java client code
Error when calling a web service in Java Client