May 11, 2012

Failed to read wsdl file from url

javax.xml.ws.WebServiceException: weblogic.wsee.wsdl.WsdlException: Failed to read wsdl file from url due to -- java.net.ConnectException: Tried all: '1' addresses, but could not connect over HTTP to server: 'sinuxu31', port: '7909'


When the above error occurs, you must check the following.


1) Check that you can view the wsdl URL using a browser
  • If the WSDL URL is not accessible then the server hosting the web service is unavailable. 
  • Check if you are blocked by any firewall rules.
  • You can use the following command in UNIX to get the wsdl file
    • wget -O google-wget.txt http://www.google.com 
    • cat google-wget.txt
 2) If the WSDL URL is accessible via Browser then check the connectivity to the external server from the server where Web service client is hosted.
  • Try ping the external server to check whether able to reach the server in the network
    • ping <external_server_host_name></external_server_host_name>
  • If the ping is not working, check that hosting server is on the network
  • Check if there is any firewall rule set to blocking the network traffic from the calling server
  • Telnet to the external server to check whether the Connection to the server is established properly
    • telnet <external_server_host_name> <port_number></port_number></external_server_host_name>
  • If telnet fails, check whether the port is opened from the calling server to get a connection to the external server
  • Do  a nslookup for the external server to check whether the DNS server name mappings
    • nslookup 
    • > <external_server_host_name>
  • If the nslookup fails, check the DNS server name mappings are done properly.

No comments: