[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 452
  • Last Modified:

Error in downloading data from webservice

When I m trying to download data using the following web service
http://www.nhs24.com/nhs24_supportgroups.asmx
I am getting an error

"Unable to download files from
http://nhs24.mhs.scot.nhs.uk/nhs24_supportgroups.asmx?wsdl
Do you want to skip these files and continue?
"
I m using vs 2010 c#
0
mmalik15
Asked:
mmalik15
  • 7
  • 6
1 Solution
 
Scott Fell, EE MVEDeveloperCommented:
The link you have for the wsdl looks wrong.  I think it should be http://www.nhs24.com/nhs24_supportgroups.asmx?WSDL and if that is the wrong one, just figure out which is correct for you.  You should be able to surf to the link and you can't with the one you have given.
0
 
mmalik15Author Commented:
Thanks for the comment.

Its a third party webservice. How can I correct this link at my end to download data?
0
 
Scott Fell, EE MVEDeveloperCommented:
You will need to ask the for the correct link.  I would guess what I gave you was correct.  Going to this link http://www.nhs24.com/nhs24_supportgroups.asmx contains, "The following operations are supported. For a formal definition, please review the Service Description."

You don't actually download the wsdl file.  It is in your code.

If you mean download the results, you will simply use your code to read the xml, save the data (if allowed by the tos) to your server, create a link on your server to download the data.
0
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.

 
mmalik15Author Commented:
When I add web reference in my project I am getting this error now
webservice-error.png
0
 
Scott Fell, EE MVEDeveloperCommented:
Look the urls in your error.  Can put them in your browser address bar and then view the xml?  No, at least for the first one.  That means you have the wrong url for your wsdl.  Double check your complete urls.  As example, http://www.nhs24.com/nhs24_supportgroups.asmx?WSDL if you click on that link you can see xml.  Try the same by typing in the urls shown in your error and you will see they are not correct.
0
 
mmalik15Author Commented:
Sorry I am still struggling to use the web service in my project. Can you kindly create a short vs project consuming this weberivce and attach with the comment. thanks
0
 
mmalik15Author Commented:
I need to consume the service method GetTopics e.g. I need all the xml for
http://www.nhs24.com/nhs24_supportgroups.asmx/GetTopics?startLetter=A

where the StartLetter parameter will have values from A to Z
0
 
Scott Fell, EE MVEDeveloperCommented:
Sorry, I don't use vs.   This is a good video to help though. http://www.youtube.com/watch?v=12PGpwy8SUY
0
 
mmalik15Author Commented:
That's fine. Shall I add the web reference using
http://www.nhs24.com/nhs24_supportgroups.asmx?WSDL

instead of http://www.nhs24.com/nhs24_supportgroups.asmx

thanks
0
 
Scott Fell, EE MVEDeveloperCommented:
I need all the xml for http://www.nhs24.com/nhs24_supportgroups.asmx/GetTopics?startLetter=A where the StartLetter parameter will have values from A to Z

I would work on  getting your original question done first.  The next step is simply passing a different variable to the url  A...B...C..... one at a time or in a loop > Save > loop etc. until you get to Z.
0
 
mmalik15Author Commented:
yeah I can loop through it once I get the xml.
0
 
Scott Fell, EE MVEDeveloperCommented:
Shall I add the web reference using
http://www.nhs24.com/nhs24_supportgroups.asmx?WSDL
Yes as that is your wsdl file.  The other link is to show you how to use the 3 methods.
0
 
mmalik15Author Commented:
Thanks Pedas.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now