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.

Answers


  1. Right click on References
  2. select Add Service Reference
  3. give the wsdl address in the address textbox
  4. click Discover
  5. Give a name for the namespace eg;- BFG
  6. 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,

http://www.codeproject.com/Articles/2761/Consuming-Web-Services-from-a-Win-Forms-Applicatio


for consuming a web service here is the steps for that.see it.,from there you will get your solution.

click here


Need Your Help

Lexical scope/closures in javaScript

javascript closures lexical-closures

I understand functions in 'js' have lexical scope (i.e. functions create their environment (scope) when they are defined not when they are executed.)

GIT and SSH, which key is used?

git ssh

Say your .ssh directory contains 30 keys (15 private and 15 public)