I'm trying to get data from online sources, specifically to do with economics. The world bank API was simple to understand, however, I need to be able to retrieve data from the united nations, through the UNdata API: http://data.un.org/Host.aspx?Content=API I am relatively inexperienced with VB.net, and don't really know where to start, and having googled around a bit and found no answers, I could really do with some help to get me off the ground. Thanks
1 Answer
One simple way to consume the service is from the project in solution.
The link you provided has an ASMX service
SOAP Web Service at http://data.un.org/ws/NSIStdV20Service.asmx
In your "Project" on your Visual studio solution, you will notice "references". Right click on it, you see a context menu.
There, you select "Add Service Reference". In the window opened, enter the above service URL, after that you can start consuming it
You should enter the URL as http://data.un.org/ws/NSIStdV20Service.asmx?wsdl
Then a proxy class gets created, which you can consume.
2 Comments
Adam Curry
Thanks for the help, would it be possible for you to elaborate further on how you can consume it, as I've not had experience with ASMX services before
Pavan Chandaka
After adding the service a proxy class gets created, for example "refrence.vb". Look for that class, It just looks like another VB class. Create an object using the class name/interface name and use it.
System.Net.WebRequestand theWebResponseyou get back from it.