Http Client sends a Synchronous request to a DB. The stored Procedure is executed and the correspoing role of the user is sent back to the HTTP Client.
List Of steps:
Below is a sample DB Structure which is used in the scenario.
sp_GetRole is the name of the Stored Procedure used.
Input parameters: Username, Password
Output parameters: Role
CREATE PROCEDURE .[sp_GetRole] @UserName char(10), @Password char(10) AS SELECT URole FROM LoginMaster WHERE UName = @UserName and UPassword = @Password GO
Create the required Data types, Message Types & message interfaces required for Request Mapping. U can find the Stored Procedure Message Type on the Left hand side of request mapping shown below.
Map the necessary fields.
EXECUTE-->action
true-->isInput
CHAR-->type (CHAR is the Data type of UName & UPassword). Refer to the DB structure in Fig 1.
Create the required Data types, Message Types & message interfaces required for Response mapping. U can find the response of Stored Procedure Message Type on the Right hand side of response mapping shown below.
Create the required Interface mapping
Execute the Scenario by sending the request, and you will get the desired output.
Hope this was a comprehensive document for Stored Procedures. For any more queries regarding stored Procedures, SDN is always open :smile: