JDBC adapter Call Stored Procedures
2008-08-18 16:45
495 查看
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.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 [dbo].[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
Go to Configuration Time and create the necessary Configuration time Objects. Receiver Determination, Interface Determination & Mapping, Receiver Agreements.
In JDBC Receiver Channel, key in the following parameter in connection textbox. jdbc:microsoft:sqlserver://<hostname>:1433;DatabaseName=<dbname>;SelectMethod=cursor
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
相关文章推荐
- Calling Stored Procedures Using the SQL Adapter
- Using JDBC to Execute Stored Procedures
- JDBC call Stored Procedure
- The Guru's guide to SQL server stored procedures, XML, and HTML
- ORA-06553: PLS-306: wrong number or types of arguments in call to 'xxxxxxx(proceduresName)'
- System stored procedures
- oracle 11g JDBC连接数据库:IO异常The Network Adapter could not establish the connection 解决方法
- Are we still talking about Stored Procedures vs. Dynamic SQL?(转)
- RxJavaCallAdapterFactory
- Using NHibernate With Stored Procedures
- JDBC连接执行 MySQL 存储过程报权限错误:User does not have access to metadata required to determine stored procedur
- mysql stored procedures with return values
- ScottGu之博客翻译-第6部分-用存储过程检索数据-LINQ to SQL (Part 6 - Retrieving Data Using Stored Procedures)
- RxJava2出现:Unable to create call adapter for io.reactivex.Flowable
- Retrofit源码解析---执行请求(DefaultCallAdapterFactory)
- Spring jdbc call oralce procedure or function
- Stored Procedures in SQLite
- The return types for the following stored procedures could not be detected
- JDBC CallableStatement Stored Procedure OUT parameter example
- Snippet: Fetching results after calling stored procedures using MySQL Connector/Python