How to: Override WSDL Binding Definitions in WSDL Files

In Application Designer, you can override the default WSDL binding definition in the WSDL file for a Web service on an ASP.NET application. The WSDL binding definition describes the Web service. For more information, see WSDL File Generation for ASP.NET Web Services.

Note

Overriding a WSDL binding definition does not change the actual definition of the Web service, only its description in the WSDL file. Therefore, make sure that the specified WSDL binding definition is appropriate for the Web service implementation. The WSDL binding definition should have the same WSDL binding name and namespace. However, even if you override the default WSDL binding definition, the topmost level Web service and port entries are always generated automatically in the WSDL file. These entries define the actual location of the Web service and its endpoints.

You can accomplish this task by specifying the location of a different WSDL file with the WSDL binding definition you want to use for each Web service provider endpoint on the application.

Note

If you override the default WSDL binding definition and plan to have your application support automated documentation after deployment, you must make sure that the WSDL file location you specify is available at run time. If the WSDL file cannot be found at the specified location, Web references to the Web service described by the WSDL file cannot be created.

To specify a different WSDL file with a WSDL binding definition

  1. On an ASP.NET application, select a Web service provider endpoint.

    -or-

    Select the Web service provider endpoint, and then in the Web Service Details window, select the endpoint row or an operation row.

    Tip

    If the Web Service Details window is closed, right-click the Web service provider endpoint and choose Define Operations.

  2. On the Diagram menu, choose Properties.

  3. Under the WSDL heading in the Properties window, set the WSDL Binding Location property to the location of the WSDL file with the WSDL binding definition you want to use.

    Tip

    In the Properties window, you can reset WSDL properties to their default values by entering a blank value.

Once the application is implemented, you can also add or edit the corresponding WSDL attribute directly in the Web service class file in the application project. Any changes that you make to attributes in code or through the designer synchronize with each other. For more information, see How to: Implement Applications on Application Diagrams.

See Also

Tasks

How to: Define Operations for ASP.NET Web Services

Concepts

Overview of ASP.NET Applications on Application Diagrams

Other Resources

Configuring WSDL File Generation for ASP.NET Web Services