Hello Team, I am trying to read the file and sending the file content to stored procedure. But the below route is returning : GenericFile[D:\in_1\MyFile.txt] instead of file content as output parameter from stored procedure.
1) Route is reading file successfully 2) I am able to log body on the console 3) Same body when I sent as input parameter to Stored procedure, it is returning: GenericFile[D:\in_1\MyFile.txt] 4) When I set some string message (not related to file) in the body then it is returning correctly. *I have attached the output in text file for the below route* *Below is the route and output in attached text file* <route id="P6: Reading from File or Queue and send to Proc"> <from uri="file:D:\in_1?fileName=MyFile.txt" /> <setProperty propertyName="foo"> <simple>${body}</simple> </setProperty> <setHeader headerName="test"> <simple>${body}</simple> </setHeader> <log message="${property.foo}" /> <log message="${headers.test}" /> <to uri="sql-stored:TestFunc(VARCHAR ${property.foo}, OUT VARCHAR OutBody)" /> <log message="${body}" /> <to uri="sql-stored:TestFunc(VARCHAR ${headers.test}, OUT VARCHAR OutBody)" /> <log message="${body}" /> <setProperty propertyName="fprop"> <simple>ok</simple> </setProperty> <log message="${property.fprop}" /> <to uri="sql-stored:TestFunc(VARCHAR ${property.fprop}, OUT VARCHAR OutBody)" /> <log message="${body}" /> <setBody> <simple> "Entered in Route Id: ${routeId}"\n </simple> </setBody> <log message="${body}" /> <to uri="file:D:\out?fileName=MyFile.txt&fileExist=Append" /> <log message="${body}" /> </route> Please let me know if you want more details regarding this issue -- Thanks, Sachin
2020-01-24 20:21:28.100 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : HelloFromFile 2020-01-24 20:21:28.103 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : HelloFromFile 2020-01-24 20:21:28.144 INFO 178632 --- [ile://D:%5Cin_1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2020-01-24 20:21:29.228 INFO 178632 --- [ile://D:%5Cin_1] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Driver does not support get/set network timeout for connections. (oracle.jdbc.driver.T4CConnection.getNetworkTimeout()I) 2020-01-24 20:21:29.246 INFO 178632 --- [ile://D:%5Cin_1] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2020-01-24 20:21:29.410 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : {OutBody=GenericFile[D:\in_1\MyFile.txt]} 2020-01-24 20:21:29.424 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : {OutBody=GenericFile[D:\in_1\MyFile.txt]} 2020-01-24 20:21:29.425 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : ok 2020-01-24 20:21:29.438 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : {OutBody=ok} 2020-01-24 20:21:29.439 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : "Entered in Route Id: P6: Reading from File or Queue and send to Proc" 2020-01-24 20:21:29.444 INFO 178632 --- [ile://D:%5Cin_1] ding from File or Queue and send to Proc : "Entered in Route Id: P6: Reading from File or Queue and send to Proc"
create or replace procedure TestFunc(InBody IN VARCHAR2, OutBody OUT VARCHAR2) is --l_out VARCHAR2(10); begin --OutBody:='Hello from Out Variable'; OutBody:=InBody; end;