java.lang.Exception: Failed to load url
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
java.lang.Exception: Failed to load url
I have just installed SoapUI 5.2.0 on Windows.
Regardless of what wsdl file I put in I get the following kind of error:
Error loading [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]: java.lang.Exception: Failed to load url; http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl, 0
I don't know if this is significant, but when I start SoapUI the space titled "SoapUI Starter Page" says
The page could not be loaded.
error log returned this:
Thu Aug 13 10:45:04 CDT 2015:ERROR:com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.makeInvalidDefinitionException(WsdlLoader.java:119)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:112)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:488)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:477)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:94)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:209)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:131)
at java.lang.Thread.run(Unknown Source)
Would appreciate some help here. Thanks.
tjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It sounds as though your SoapUI cannot see the internet. I am guessing this because the starter page is effectively a browser that loads some web based content and when a WSDL wont load due to problems resolving network/web based dependencies, this often means that SoapUI cannot see the internet.
Common causes for this are:
- Needing to configure proxy settings (in SoapUI preferences > Proxy Settings).
- Needing to allow SoapUI access in firewall settings.
Whilst the internet isn;t strictly required to use SoapUI for testing local web services etc, it would affect the two things you listed.
Cheers,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rupert,
Thanks for your reply. I am going to see what I can do to apply your suggestions.
It may be of interest that I have installed SoapUI on an Apache server -- which is my development machine for http://localhost development. Don't know if this is significant.
Also - I think that I posted the additional info about the error log while you were also responding. So this might also be significant. Sorry for not posting that info before you responded.
Thanks,
tjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi tjay,
Ok, no problem.
I have been able to build a SOAP project based on http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl e.g.
So that WSDL is fine. I am using SOapUI 5.2 Beta.
Have you tried making requests from that box from outside of SoapUI e.g.
curl http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl
Assuming you have curl (or similar basic shell based means of making an http request), if that doesn't work then SoapUI wont be able to see the WSDL either.
Cheers,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for responses Rupert.
I have not tried curl. I do have php-soap enabled.
I have been able to open url www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl with no problems on the browser.
I have been a PHP programmer for years. I am trying to learn SOAP and understand all its elements. I have a main source for wsdl file for a major project, and am able to communicate with it through PHP's SoapClient - but don't understand SOAP well enough for smooth communications yet. I was hoping SoapUI would be the program that would speed up my learning process. That may help you know where I am coming from.
I assume you read the error log that I added to my first post while you were sending your first respons - and if so, did that tell you anything.
Thanks - tjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi tjay,
Ok, so from that Apache box php SOAP is able to make a SOAP/HTTP request successfully?
Whilst SoapUI wont necessarily teach you SOAP funcdamentals, which can be rather confusing, especaially hand crafting WSDLs etc, SoapUI is definately an excellent tool for testing SOAP web services once you get going.
Sorry, I didn't remark on the stacktrace, as it appears to be the standard error that can occur even if you mispel the WSDL URL e.g. I made a typo and got:
Thu Aug 13 17:47:00 BST 2015:DEBUG:Loading WSDL: http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]
Thu Aug 13 17:47:00 BST 2015:DEBUG:Returning baseInputSource [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]]
Thu Aug 13 17:47:00 BST 2015:ERROR:An error occurred [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException], see error log for details
Thu Aug 13 17:47:35 BST 2015:DEBUG:Connection closed
due to the trailing ]
Where you say that the wsdl opens in a broswer I am assuming this too is from the Apache box, meaning that browsers and PHP SOAP have no problem on the box.
Do you have a firewall or proxy running on that box that might prevent SoapUI from accessing the internet over port 80?
Just incase it helps, here is the output when SoapUI imports the WSDL (note the multiple imports from withim the WSDL):
Thu Aug 13 17:48:10 BST 2015:DEBUG:Getting wsdl component from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]
Thu Aug 13 17:48:10 BST 2015:DEBUG:Attempt 1 to execute request
Thu Aug 13 17:48:10 BST 2015:DEBUG:Sending request: GET /wcf/StockQuoteService.svc?wsdl HTTP/1.1
Thu Aug 13 17:48:10 BST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Thu Aug 13 17:48:10 BST 2015:DEBUG:Connection can be kept alive indefinitely
Thu Aug 13 17:48:11 BST 2015:DEBUG:Getting wsdl component from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd0]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Stale connection check
Thu Aug 13 17:48:11 BST 2015:DEBUG:Attempt 1 to execute request
Thu Aug 13 17:48:11 BST 2015:DEBUG:Sending request: GET /wcf/StockQuoteService.svc?xsd=xsd0 HTTP/1.1
Thu Aug 13 17:48:11 BST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Thu Aug 13 17:48:11 BST 2015:DEBUG:Connection can be kept alive indefinitely
Thu Aug 13 17:48:11 BST 2015:DEBUG:Getting wsdl component from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd2]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Stale connection check
Thu Aug 13 17:48:11 BST 2015:DEBUG:Attempt 1 to execute request
Thu Aug 13 17:48:11 BST 2015:DEBUG:Sending request: GET /wcf/StockQuoteService.svc?xsd=xsd2 HTTP/1.1
Thu Aug 13 17:48:11 BST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Thu Aug 13 17:48:11 BST 2015:DEBUG:Connection can be kept alive indefinitely
Thu Aug 13 17:48:11 BST 2015:DEBUG:Getting wsdl component from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd3]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Stale connection check
Thu Aug 13 17:48:11 BST 2015:DEBUG:Attempt 1 to execute request
Thu Aug 13 17:48:11 BST 2015:DEBUG:Sending request: GET /wcf/StockQuoteService.svc?xsd=xsd3 HTTP/1.1
Thu Aug 13 17:48:11 BST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Thu Aug 13 17:48:11 BST 2015:DEBUG:Connection can be kept alive indefinitely
Thu Aug 13 17:48:11 BST 2015:DEBUG:Getting wsdl component from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd1]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Stale connection check
Thu Aug 13 17:48:11 BST 2015:DEBUG:Attempt 1 to execute request
Thu Aug 13 17:48:11 BST 2015:DEBUG:Sending request: GET /wcf/StockQuoteService.svc?xsd=xsd1 HTTP/1.1
Thu Aug 13 17:48:11 BST 2015:DEBUG:Receiving response: HTTP/1.1 200 OK
Thu Aug 13 17:48:11 BST 2015:DEBUG:Connection can be kept alive indefinitely
Thu Aug 13 17:48:11 BST 2015:DEBUG:Loading Definition...
Thu Aug 13 17:48:11 BST 2015:DEBUG:Loading WSDL: http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning baseInputSource [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd1]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd2]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd0]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd2]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd3]
Thu Aug 13 17:48:11 BST 2015:DEBUG:Returning latest import URI [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd1]
Thu Aug 13 17:48:11 BST 2015:INFO:Loading schema types from [http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl]
Thu Aug 13 17:48:11 BST 2015:INFO:Getting schema http://www.restfulwebservices.net/wcf/StockQuoteService.svc?wsdl
Thu Aug 13 17:48:11 BST 2015:INFO:Getting schema http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd0
Thu Aug 13 17:48:11 BST 2015:INFO:Getting schema http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd2
Thu Aug 13 17:48:11 BST 2015:INFO:Getting schema http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd3
Thu Aug 13 17:48:11 BST 2015:INFO:Getting schema http://www.restfulwebservices.net/wcf/StockQuoteService.svc?xsd=xsd1
Thu Aug 13 17:48:12 BST 2015:DEBUG:Loaded Definition: ok
Thu Aug 13 17:48:12 BST 2015:INFO:Finding importer for {http://www.restfulwebservices.net/ServiceContracts/2008/01}BasicHttpBinding_IStockQuoteService
Thu Aug 13 17:48:12 BST 2015:INFO:Importing binding {http://www.restfulwebservices.net/ServiceContracts/2008/01}BasicHttpBinding_IStockQuoteService
Thu Aug 13 17:48:12 BST 2015:INFO:importing endpoint http://www.restfulwebservices.net/wcf/StockQuoteService.svc
Thu Aug 13 17:48:12 BST 2015:INFO:importing operation GetStockQuote
Thu Aug 13 17:48:12 BST 2015:INFO:importing operation GetWorldMajorIndices
Thu Aug 13 17:48:45 BST 2015:DEBUG:Connection closed
Cheers,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rupert -
Yes, it is all the same box and am able to make a SOAP/HTTP request successfully in the browser. The firewall is set to accept SoapUI and the Proxy is set to automatic.
I wondered if the [brackets] were part of the problem, but as these were populated into the function by SoapUI, I saw them as out of my control.
I understand what you are saying about SoapUI not a source for learning SOAP fundamentals. The following is why I am trying SoapUI:
All I am interested in is building a SOAP client interface with one .../site_path/APIService.asmx?wsdl
I have the API reference guide and am struggling with how to properly interface with WSDL structure elements through the SoapClient (a PHP method/application).
I came across a site that seemed promising in moving me along here (http://devzone.zend.com/2202/php-and-soap-first-steps/) -- which uses SoapUI as part of its training. ... So this is why I turned my attention to SoapUI.
Thanks so much for your responses and attention to trying to help me. Many kudos to you!
If you see anything in this post that triggers some possible solutions I would be most grateful. I have been working on this for 5 days now.
Blessings on you.
tjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi tjay,
Ok, sorry, just checking about the browser etc being on the same box.
One thing on the proxy settings, is that I tend to use NONE or MANUAL in the case where there is a proxy, rather than automatic.
Other than that I can only suggest testing SoapUI on a different box, possibly on your home network e.g. no proxy or briefly disabling the firewall - sometimes virus checkers can also affect things.
Thank you very much for the appreciation, but I would feel better if I was able to help you solve the issue. I do hope you are able to find whats blocking SoapUI, as it would be a shame if you get put off due to the connectivity issue.
And when you hopefully find the issue, please post what it was, as it could help others.
Thanks,
Rupert
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rupert -
Silly me. The source of the "WSDL" spoke as though I had to use SOAP. I have used PHP for over 12 years now and had created many APIs parsing XML files into arrays. But I was persuaded in this instance that I had to use SOAP and hadn't tried anything else.
But as I was analyzing one of the "incomplete" returns that I should try my old tried and true PHP stuff as I had always been using it -- and sure enough it was smooth and quick sailing.
Thanks for your valiant attempt in trying to get SoapUI working on my machine - but as it turns out, I don't really need it as of yet.
The best of things to you!
tjay
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi tjay,
No, problem, shame we couldn't fix your problem though. As long as you're happy, thats the main thing!
Hopefully if/when you do need SoapUI, we can get it working for you, as it seems to work quite well for that WSDL/service...
Best regards,
Rup
