Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

calling stored procedure from apache camel

I am trying to call a stored procedure in an Oracle database from Apache Camel using dsl component. It's input and output are as follows:

CREATE OR REPLACE PROCEDURE RETRIEVE_SUBSC_NUMBER( 
CUSTOMER_CODE IN VARCHAR2,  
MSISDN IN VARCHAR2, 
PRODUCTID IN VARCHAR2, 
BILLING_ACCOUNTS IN LIST_OF_BILL_ACCNT, 
SUBSCRIPTIONS OUT LIST_OF_SUBSCRIPTION, 
STATUS_CODE OUT VARCHAR2, 
ERROR_CODE OUT VARCHAR2, 
ERROR_DESCRIPTION OUT VARCHAR2)

Here the input LIST_OF_BILL_ACCNT is a string list defined as follows:

create or replace TYPE GET_BILL_ACCOUNTS AS OBJECT(
BILLING_ACCOUNT_ID VARCHAR2(50 CHAR)));

Also the output LIST_OF_SUBSCRIPTION is an object-type list, whose definition is as follows:

create or replace TYPE GET_SUBSCRIPTION AS OBJECT(
ProductName VARCHAR2(50 CHAR),
ProductId VARCHAR2(50 CHAR),
SubscriptionNo VARCHAR2(50 CHAR),
SubscriptionStatus VARCHAR2(50 CHAR),
BillingAccountCode VARCHAR2(50 CHAR),
CustomerCode VARCHAR2(50 CHAR),
MSISDN VARCHAR2(50 CHAR));

My dsl route is as follows:

.to("sql-stored:SIEBEL.RETRIEVE_SUBSC_NUMBER(VARCHAR ${header.productName}, VARCHAR ${header.productId}, VARCHAR ${header.msisdn}, ????, OUT VARCHAR STATUS_CODE, OUT VARCHAR ERROR_CODE, OUT VARCHAR ERROR_DESCRIPTION, ????)?dataSource=dataSource")

How can I give as input and call the list areas? Please help me in resolving the issue.

question from:https://stackoverflow.com/questions/65889628/calling-stored-procedure-from-apache-camel

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...