简体   繁体   中英

Visual Studio 2017 Community consume WSDL

I have two WSDL files for creating a SOAP API, and would like to use them in Visual Studio. All the Googling I've done refers to a "Add Service Reference" to bring these in, but I don't see this option anywhere. I only have the option to enter a web address, which I don't have for these. Does anyone know a simple way to consume these WSDLs in VS 2017?

Right Click your project> select "Add (D)" > click "Service Reference (S)"> Input your WSDL url and click "Move (G)" if you have the URL or "Explore (D)" if you have the WSDL in your solution. It should then pop-up below, and remember to NAME your namingspace(N), they are important. And "OK". It should pop-up in your project.

The above solution is only valid to certain project types. Eg: Xamarin.form doesnt have "Service Reference", hence alternative solution for that.

ELSE enjoy!

As for how to use those newly added WSDL. Simply go to your program and new them like any other classes or call them as you normally would. If it's in another project, then you have to USING XXXX;

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