Scenario:

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.

JDBC adapter Call Stored Procedures

List Of steps:

  1. Below is a sample DB Structure which is used in the scenario.

    JDBC adapter Call Stored Procedures

  2. sp_GetRole is the name of the Stored Procedure used.

    Input parameters: Username, Password

    Output parameters: Role





  3. 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.

    JDBC adapter Call Stored Procedures

  4. 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.

  5. 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.

    JDBC adapter Call Stored Procedures



  6. Create the required Interface mapping

    JDBC adapter Call Stored ProceduresJDBC adapter Call Stored Procedures



  7. Go to Configuration Time and create the necessary Configuration time Objects. Receiver Determination, Interface Determination & Mapping, Receiver Agreements.

  8. In JDBC Receiver Channel, key in the following parameter in connection textbox. jdbc:microsoft:sqlserver://<hostname>:1433;DatabaseName=<dbname>;SelectMethod=cursor

    JDBC adapter Call Stored Procedures

  9. Execute the Scenario by sending the request, and you will get the desired output.

 

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1671

 

相关文章:

  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-02-22
  • 2022-12-23
猜你喜欢
  • 2021-05-18
  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-11-16
相关资源
相似解决方案