cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Reijn" <>
Subject RE: Reading Output params from Stored Proc in sitemap
Date Thu, 05 Oct 2006 13:51:14 GMT
Hi Oleg,
i'm not completely sure, but I think the out-parameters will end up in the SAX stream instead
of them being available in the sitemap after the transformation stage.
Jeroen Reijn

-----Original Message-----
From: Oleg Konovalov []
Posted At: Wednesday, October 04, 2006 10:15 PM
Posted To: Cocoon User List
Conversation: Reading Output params from Stored Proc in sitemap
Subject: Reading Output params from Stored Proc in sitemap


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 value.

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

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

sitemap entry:

                                    <map:match pattern="mbr/create_wip_roster">

                                                <map:act type="request">

                                                            <map:parameter name="parameters"

                                                            <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">

name="company_number" value="{company_number}"/>

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">

name="error_text" value="{error_text}"/>

                                                                        <map:when test="$error_text">




name="roster_id" value="{roster_id}"/>




                                                            <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