How do I add a WSDL to a Visual Studio 2005 project?

One of our vendors provides a web service API to allow their customers to validate data in a database. As part of their SDK, they provide a WSDL (Web Service Definition Language) file that, according to their documentation, can "be read by software applications and application development tools. An application tool such as Microsoft's Visual Studio can import a WSDL document and automatically generate software classes that access the Web Services the WSDL defines."

I'm currently using Visual Studio 2005. What do I need to do to get Visual Studio to do the magic code generation for me?


UPDATE: This wasn't obvious to me, but if you have a static WSDL file stored locally on your computer, you can just paste the file path (eg C:WSDLFilesService.WSDL ) into the address bar of the Web Reference dialog box.


If you right click on the project in the solution explorer, and select “Add Web Reference…” you will get a dialog to link the WSDL file to your project. Visual Studio will then download the WSDL and generate all the stuff needed to use the interface in the IDE.

The WSDL should be exposed at the URL of their web service, you don't link to the file they gave you. I imagine that the file is just for reference.


右键单击您的Web项目并选择“ Add web reference ”,基本上按照说明操作。


To include all the service references as web references:

http://brijbhushan.net/2013/04/23/wsdl-ans-svcutil-add-web-service-reference-in-vs-20102012/

链接地址: http://www.djcxy.com/p/45562.html

上一篇: 资源可用性和利用率跟踪

下一篇: 如何将WSDL添加到Visual Studio 2005项目?