Udostępnij za pośrednictwem


How to: Edit Operations for ASP.NET Web Services

In Application Designer and System Designer, you can edit the operations and parameters of a .NET Web Service provider endpoint. You can perform this task by using the Web Service Details window or the Properties window.

If you implement an ASP.NET application that exposes a .NET Web Service provider endpoint, you can edit the endpoint's operations and parameters in code by opening its Web service class file. If you created a class diagram for the Web service, you can also use Class Designer. Visual Studio synchronizes the changes you make in the designers or in code.

Note

When you edit the operations for a .NET Web Service provider endpoint, you edit them for all uses of that endpoint. If you make substantial changes to a Web service definition after it is published, you should change the WSDL binding name, the WSDL binding namespace, or both. Such changes include changing the operation or message names, message or parameter definitions, or expected behavior. Changing the Web service definition without changing its WSDL binding name or namespace might hide the fact that the Web service is no longer compatible with connected or previously connected applications. For more info, see Overview of ASP.NET Applications on Application Diagrams.

To edit an operation or parameter in the Web Service Details window

  1. On the diagram, select the Web service provider endpoint with the operation or parameter you want to edit.

  2. On the Diagram menu, choose Define Operations.

  3. In the Web Service Details window, make the changes you want to the operation or parameter.

    Tip

    You can also right-click the endpoint and choose Define Operations.

To edit an operation or parameter in code or in Class Designer

  1. On the diagram, right-click the Web service provider endpoint and choose one of the following:

    • View Code to open the Web service class file.

    • View In Class Diagram - <WebServiceName> to create or open an existing class diagram for the Web service.

      Note

      A new class diagram is created if one has not been previously saved. Otherwise, the previously saved class diagram is opened.

  2. In the class file or on the class diagram, make the changes you want to the operation or parameter.

    Tip

    You can also right-click the endpoint in the Web Service Details window and choose View Code or View In Class Diagram - <WebServiceName>. You can also open these files from the Web application project in Solution Explorer or double-click the endpoint or operation to navigate directly to the code.

See Also

Tasks

How to: Define Operations for ASP.NET Web Services

How to: Delete Operations and Parameters from ASP.NET Web Services

Reference

Keyboard Shortcuts for the Web Service Details Window

Other Resources

Defining Operations for ASP.NET Web Services