简体   繁体   中英

Calling an asmx service from Web API

Need to call asmx service from one of my get methods in web api .How can we do that ? Can we add a config entry in appsettings to the asmx service url and call it from the web api get mehod?

web config app settings entry:

key="myOldWebservice" value = "http://testAPI/webservice/client.asmx"/>

Add the asmx service as a Service Reference to your project in VS and call asmx methods from that reference. Just like invoking methods in dlls.

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