This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to establish connection to WSDL. Failed to access the WSDL.

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I was curious to write a proxy client to some external webservices defined at http://xmethods.net and I chose the webservice that is based on Visual Data Flex and the service name is "Worldcup 2010 Football Championships". My excitement did not last longer, as I was not able to access the WSDL from my client .

Steps I followed.

1) I downloaded the WSDL and generated the client side artifacts using the wsimport tool and it was successful. I see all the required artifacts.
2) I tried to access the wsdl from browser through the link "http://footballpool.dataaccess.eu/data/info.wso?wsdl" and it was successful.
3) I wrote a client as below.



When I ran my client, it threw me an exception



I did not really understand the exception, as I can access this WSDL through browser. But why not from my client. I also failed to access this WSDL from Webservices Explorer in eclipse.

Please suggest.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I don't know if this is intentional on the behalf of the service provider. Perhaps they are checking the HTTP headers...
I ran a quick test with soapUI and am able to read the WSDL, send requests and obtain responses.
Best wishes!
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ivan Krizsan wrote:Hi!
I don't know if this is intentional on the behalf of the service provider. Perhaps they are checking the HTTP headers...
I ran a quick test with soapUI and am able to read the WSDL, send requests and obtain responses.
Best wishes!


Thanks Ivan.

As I mentioned, I can access the WSDL through browser, but not through eclipse or through client. When you say intentional blocking and checking of headers, what specific headers they might be looking and blocking the connection and why is this not happening through browser. Would HTTP headers vary between the way it is accessed.

Also could you please shed some light on SOAPUI. What is it?

Thanks
 
Mikalai Zaikin
Ranch Hand
Posts: 3331
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

As an option you can download WSDL using browser, save on local disk and point wsdlLocation attribute to local copy of WSDL.

Best regards,
MZ
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
soapUI is a program for testing various kinds of web service, both SOAP and RESTful.
There is a free version and I recommend you downloading and familiarizing yourself with this program, it is one of the more useful utilities I have come across in quite some time.
http://www.soapui.org/
I am in no way affiliated with the company behind soapUI.
Best wishes!
 
Niko Bellic
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the exact same problem as the OP 4 years later.

I could use wsimport to generate the web service Java classes, but could not call the web service from Eclipse or from the command line using a jar. I got the same error as the OP...



That's the error you get if your computer cannot reach the WSDL (either because your internet is down, or you are behind some firewall, or whatever).

Any updates on a solution?

I switched my internet connection to the "guest" network instead of the company network, and everything worked. However, I would rather not have to do this every time I want to use a web service. There is a company proxy that we can use to access the internet freely while still remaining on the company network, and when I specify it in my browser (i.e. http://windows.microsoft.com/en-us/windows/change-internet-explorer-proxy-server-settings#1TC=windows-7), it allows me to go wherever BUT the web services still don't work! Do Java programs just simply ignore the proxy setting on your computer?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic