简体   繁体   中英

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. AC# code snippet would be great.

Can anyone give me some directions? I am working in Visual Studio 2008 and a C# Windows App.

  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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM