Adding operations that are based on calls to stored procedures
You can create operations that call any stored procedure that is deployed in your database.
Prerequisite:
The stored procedure must be deployed on the database that is associated with the Web service in which you want to create the operation.
Restrictions:
- Each operation within a Web service must have a unique name.
- You can include one stored procedure call per operation.
To add to a Web service an operation that calls a stored procedure, follow one of these steps:
- Drag the stored procedure from the Data Source Explorer and drop it onto the Web service in the Data Project Explorer.
- If the stored procedure is listed in the
Stored Procedures folder of your project and the stored procedure is deployed to the database that your project is using, right-click the stored procedure and select
Add to Web Service.
- If an operation that is based on the stored procedure already exists in a Web service in a project in your workspace, drag the operation and drop it onto the target Web service. If you drag from one project to another, either of these conditions must be true:
- Both projects are associated with the same datasource.
- One project is associated with a snapshot of the database that is associated with the other project.
If the stored procedure returns result sets and always accepts the same input values, use the
Edit Operation wizard to specify the input values. The workbench then runs the stored procedure to generate an XML schema that describes the result sets in detail.
Related concepts
Generation of default XML schemas for stored procedures that return result sets
Related tasks
Adding operations that are based on SQL scripts
Developing Web services with the workbench