How to: Define Operation and Parameter Types for ASP.NET Web Services
In Application Designer, you can define types that are referenced by the operations and parameters of a Web service on an ASP.NET application. When you define the operations and parameters for a Web service provider endpoint using the Web Service Details window, you can either select a type, reference a type defined in another project, or reference a type to define later. Once the application is implemented, you can also define the type through code or using Class Designer.
Note
You must first implement the application before you can begin defining an operation or parameter type. If you reference a type that is defined in another project, you must add references to those projects after the application is implemented. For more information, see How to: Implement Applications on Application Diagrams and How to: Add and Remove References in Visual Studio (C#, J#).
For more information, see the following topics:
To define an operation or parameter type
On the diagram, select a Web service provider endpoint on an ASP.NET application.
On the Diagram menu, choose Define Operations.
Tip
You can also right-click the endpoint to choose Define Operations.
The Web Service Details window appears.
In the Web Service Details window, right-click the operation or parameter row with the type you want to define and choose Define '<typename>' in the Current Project.
In Solution Explorer, a class file for the type is added to the associated application project. You can now choose to use Class Designer to visually define the type on a class diagram.
When you are prompted to open Class Designer, choose one of the following:
Yes to add a class diagram (.cd) file to the project and open Class Designer.
No to decline adding a class diagram.
Instead, you can define the type in the class file or add a reference to a class library that defines the type.
Tip
You can always use Class Designer at a later time to define the type. For more information, see How to: Edit Operation and Parameter Types for ASP.NET Web Services and Designing and Viewing Classes and Types.
See Also
Tasks
How to: Delete Operations and Parameters from ASP.NET Web Services
Reference
Keyboard Shortcuts for the Web Service Details Window