|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
How to: Locate WSDL Files for Web Services
In Application Designer, you must specify the location of a WSDL file when you perform any of the following actions:
Add an external or BizTalk Web service to the application diagram. For more information, seeand .
Create a Web service provider endpoint on an ASP.NET application from a WSDL file. For more information, seeand .
Specify a different WSDL file for generating Web references to an implemented Web service provider endpoint on an ASP.NET application. You can specify this using the WSDL Location property on the Web service provider endpoint.
Make sure that WSDL file specified is a valid description of the Web service and that it references the Web service provider endpoint at its actual address. If the WSDL file specifies a different address for the provider endpoint, an external Web service is created, and any consumer endpoints connected to the Web service provider endpoint are reconnected to the external Web service.
Override the default WSDL binding definition in the automatically generated WSDL file by specifying a WSDL binding location. For more information, see.
Change the location of the WSDL file that you want to use for a Web service provider endpoint on an implemented ASP.NET Web service.
When you perform these any of these actions, the Add Web Reference dialog box appears.
While the Add Web Reference dialog box appears in each scenario, a Web reference is created only when adding a Web reference to an application project in Solution Explorer. If the Web reference you add to a project is associated with an existing Web service in the solution, the application to which you added the Web reference will be connected to the existing Web service. Otherwise, a new external Web service is created and connected to the application. For more information, seeand .
In all other scenarios, the dialog box makes it possible for you to specify the location of a WSDL file.
WSDL files that contain multiple WSDL bindings or DISCO files that reference multiple Web services are not supported. Do not create external Web services directly from Web services that already exist in your solution. The location of a Web service provider endpoint can be referenced only once on the application diagram. Instead, specify a WSDL file location for a Web service not in the solution.
To specify a WSDL file location for a Web service
In the Add Web Reference dialog box, enter the location of the WSDL file or Web service definition and click Go.
You can specify a WSDL (.wsdl) file, a location on the Web, or the location of a Web service if the Web service publishes its WSDL file automatically.
If a WSDL file exists, the Add Web Reference dialog box displays information about the Web service and operations it offers.
Click Add Reference.
The external Web service, BizTalk Web service, or Web service provider endpoint appears on the diagram and is selected.
Depending on the scenario, note the following results and possible actions you might need to take:
If you added an external or BizTalk Web service, a System Definition Model (.sdm) file appears immediately in the Solution Items folder in Solution Explorer. For more information, see.
If you created a Web service provider endpoint on an ASP.NET application from a WSDL file, an .asmx file and Web service class file appear in the application project if the application is implemented. For more information, see.
If you specified a different WSDL file for an existing Web service provider endpoint, you might want to update any Web references to that Web service. For more information, see.