简体   繁体   中英

How do I consume an existing webservice in ASP.NET?

I need to consume an existing web service in ASP.net.

The documentation of the website that provides the web servicesays that I have to use WSDL.exe to generate a stub, but I can't find this tool.

I also tried the Add web reference wizard in Visual Studio 2010 (VS2010), but if I paste the URL in, VS2010 doesn't work anymore.

What am I missing?

As far as I remember there should be a choice between .net 2.0 and WCF services.

Try to select .net 2.0 web service type. We had to do it for using SOAP web services running on Python.

As far as I know, you can't create SOAP webservice with .net 4. When you creating new project, you need to choos .net 3.5 or earlier first, and then create project.

As for creating stub from existing wsdl, I don't know how to do it.

You might also try using the Add Service Reference Wizard instead - worked for me for WebServices the Web Reference Wizard did not like quite as much. Make sure to use the link to either the asmx (if it's one) or the .wsdl

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