简体   繁体   中英

C# program to call existing web API

How can I call / use web API that supports SOAP and REST? I want to write a program in C# that will use this web API. I didn't get much information on the internet. So far, I have created C# project and added the web service reference (WSDL) to my program. Now how can I use the web API. How to send request or receive response? Can you please refer me some good tutorials ?

Adding web service reference creates client classes that can be used to communicate with web service. All created classes will be in new namespace, You have to look for client proxy class (full name depends on WebService name). Create instance of this class. Calling its methods will call WebService. Here you can read about using Web Services in C#

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