Use a Web Service in C# Windows App
I am new to using web services. I am assigned a task in which I need to use a web service in my Windows app. This is the web service I would be using: https://api.betfair.com/global/v3/BFGlobalService.wsdl
Now, I've learned how to add a web reference to this service, but I could not find a basic tutorial that could help me learn how to make an object of this web service and use the service as I want to.
Basicaly, what I need is to create an object from the above web service in my form, and to call it's methods. A C# code snippet would be great.
Can anyone give me some directions? I am working in Visual Studio 2008 and a C# Windows App.
- Right click on References
- select Add Service Reference
- give the wsdl address in the address textbox
- click Discover
- Give a name for the namespace eg;- BFG
- You can access the resources like BFG.MethodName() from you code
Please look at the following link for a sample application of consuming C# WEb Service in Win App,
for consuming a web service here is the steps for that.see it.,from there you will get your solution.