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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…