This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the problem. This was because of the firewall.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic