cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Konovalov <>
Subject Reading Output params from Stored Proc in sitemap
Date Wed, 04 Oct 2006 20:15:19 GMT

I have 2 output parameters in stored procedure named ‘roster_id’ and 
‘error_text’ (the stored procedure is executed from create_wip_roster-query2.xml).

If the ‘error_text’ is populated 
then redirect page to ‘upload_wip_form’ along with the error_text 

If the ‘error_text’ is not populated 
then redirect the page to ‘wip_roster’ form along with the ‘roster_id’ 

For some reason I can not get obtain any parameters from stored procedure for executing correct




<map:act type="request">

<map:parameter name="parameters" value="true"/>

<map:generate src="xml/create_wip_roster-query2.xml"/>

<!-- this xml doc executes a 
procedure and gives out two output parameters named roster_id and error_text 

<map:transform type="sql">

<map:parameter name="company_number" value="{company_number}"/>
<map:parameter name="use-connection" value="db_conn"/>


<!-- Here I want to check 
if the error_text is populated then redirect to upload_wip_form, 

                                                                   if not, then redirect to
wip_roster does not work. -->

<map:select type="parameter">

<map:parameter name="error_text" value="{error_text}"/>

<map:when test="$error_text">

<map:redirect-to uri="upload_wip_form?error_text={error_text}"/>



<map:parameter name="roster_id" value="{roster_id}"/>

<map:redirect-to uri="wip_roster"/>



<map:serialize type="html"/>




            <sql:query name="roster" isstoredprocedure="true">
                 begin mySP (<sql:substitute-value sql:name="company_number"/>,?,?);end;

            <sql:out-parameter sql:nr="1" sql:name="roster_id" sql:type="oracle.jdbc.driver.OracleTypes.NUMBER"/>
            <sql:out-parameter sql:nr="2" sql:name="error_text" sql:type="java.sql.Types.VARCHAR"/>


Sorry for the newbie question.
Thank you in advance,

View raw message