Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 (e.g. C:\WSDLFiles\Service.WSDL) into the address bar of the Web Reference dialog box.

like image 530
Ben McCormack Avatar asked Apr 23 '10 16:04

Ben McCormack


People also ask

How do you add a Web reference to a project?

To add a Web Reference On the Project menu, click Add Web Reference. In the URL box of the Add Web Reference dialog box, type the URL to obtain the service description of the Excel Web Services, such as http://<server>/<customsite>/_vti_bin/excelservice.asmx or http://<server>/_vti_bin/excelservice.asmx .

How do I add a Web service URL in Visual Studio?

In Solution Explorer, right-click the name of the project to add the Web service to and then click Add Web Reference. The Add Web Reference dialog box is displayed. In the URL box, enter the URL of the Web service to use.

How do I add a Web service reference in Visual Studio 2008?

Create the Client Program Then click on the "Advanced" button below in the left corner. Then you will see a screen like this will appear. Then click on "Add Web Reference" on the following left corner of the screen.


1 Answers

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.

like image 68
Bremer Avatar answered Oct 02 '22 03:10

Bremer