1

I'm using wso2 micro integrator and the integration studio. I'm searching for a way to call a procedure that has multiple IN and OUT parameters in ESB project.

let's say we have this procedure in our database.

CREATE OR REPLACE PROCEDURE SAY_HELLO(FULLNAME IN VARCHAR2, RESPONSE OUT VARCHAR2)
AS
BEGIN
  RESPONSE := 'Hello ' || FULLNAME;
END;

I want a way to be able to call this procedure using a WSO2 mediator (dblookup or dbreport) and store each OUT argument in a dedicated property.

1 Answers1

0

I don't think you can map OUT variables to a property. If you can do a select within the stored procedure and return a resultset it might work. For example something like below.

<dbreport>
    <connection>
        <pool>
            ..............
        </pool>
    </connection>
    <statement>
        <sql><![CDATA[CALL SAY_HELLO(?);]]></sql>
        <parameter type="INTEGER" value="1"/>
        <result column="response" name="out_prop"/>
    </statement>
</dbreport>
<log level="full">
    <property expression="$ctx:out_prop" name="OUTPUT"/>
</log>

Or you can consider using a Dataservice instead.

ycr
  • 12,828
  • 2
  • 25
  • 45