Thanks a lot, I should have guessed this.
-----Original Message-----
From: Zoran Regvart <[email protected]>
Sent: Tuesday, June 11, 2019 2:01 AM
To: [email protected]
Subject: Re: Oracle Stored Proc and Camel...
[**EXTERNAL EMAIL**]
Hi Rajib,
what you're seeing as `{result=Hello World OUT parameter}` is the String
representation of a Java Map, you can reference values in the map using their
keys, i.e. Camel Simple language expression `${body[result]}` should give you
the content you need.
Take a look at the documentation on the Simple language:
https://apc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fcamel%2Fblob%2Fmaster%2Fcore%2Fcamel-base%2Fsrc%2Fmain%2Fdocs%2Fsimple-language.adoc&data=02%7C01%7CRajib_Deb%40infosys.com%7C35664c79ff99468f3d9908d6ee4b6e39%7C63ce7d592f3e42cda8ccbe764cff5eb6%7C1%7C0%7C636958405086536133&sdata=VG1ZyqDDojiQJFX44Hkqeacs5My32aDb4VBsq2qr0rY%3D&reserved=0
zoran
On Tue, Jun 11, 2019 at 6:00 AM Rajib Deb <[email protected]> wrote:
>
> Hi
> I am writing a camel route to call a stored procedure and get the
> return value. I am able to get it but it is coming as below
>
> rajib after creatcredit {result=Hello World OUT parameter}
>
> However, I need only " Hello World OUT parameter" in the body and not result=
> concatenated with the output. Please let me know how to achieve that.
>
> This is my camel route
> ----------------------------------
> from("kafka:localhost:xxxxx?topic=xxxxxx&groupId=xxxx&autoOffsetReset=earliest&consumersCount=1").routeId("xxxx")
> .to("sql-stored:procOneOUTParameter(OUT VARCHAR result)")
> .log("rajib after creatcredit ${body}");
>
>
> This is the stored procedure
> -----------------------------------------
> CREATE OR REPLACE PROCEDURE procOneOUTParameter(outParam1 OUT
> VARCHAR2) IS BEGIN
>
> outParam1 := 'Hello World OUT parameter';
>
> END;
> /
>
> Thanks
> Rajib
--
Zoran Regvart