Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 80281 invoked from network); 5 Oct 2006 13:55:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Oct 2006 13:55:30 -0000 Received: (qmail 38632 invoked by uid 500); 5 Oct 2006 13:55:24 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 38586 invoked by uid 500); 5 Oct 2006 13:55:23 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 38575 invoked by uid 99); 5 Oct 2006 13:55:23 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [213.133.33.40] (HELO smtp.is.nl) (213.133.33.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Oct 2006 06:55:19 -0700 Received: from [213.133.51.241] (HELO hai01.hippo.local) by smtp.is.nl (CommuniGate Pro SMTP 5.0.10) with ESMTP id 1320713 for users@cocoon.apache.org; Thu, 05 Oct 2006 15:51:40 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6E885.52E48798" Subject: RE: Reading Output params from Stored Proc in sitemap Date: Thu, 5 Oct 2006 15:51:14 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Reading Output params from Stored Proc in sitemap Thread-Index: Acbn8dtY1secfQZSR9ue6JeRRvFwZAAk1Ndw From: "Jeroen Reijn" To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C6E885.52E48798 Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hi Oleg, =20 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. =20 Regards, =20 Jeroen Reijn -----Original Message----- From: Oleg Konovalov [mailto:olegkon@yahoo.com] 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 Hi, I have 2 output parameters in stored procedure named =A1roster_id=A2 and = =A1error_text=A2 (the stored procedure is executed from = create_wip_roster-query2.xml). If the =A1error_text=A2 is populated then redirect page to = =A1upload_wip_form=A2 along with the error_text value. If the =A1error_text=A2 is not populated then redirect the page to = =A1wip_roster=A2 form along with the =A1roster_id=A2 value. For some reason I can not get obtain any parameters from stored = procedure for executing correct redirect. =20 sitemap entry: = = = = = = = = = = = = = = = = http://apache.org/cocoon/SQL/2.0"> =20 begin mySP (,?,?);end;=20 Sorry for the newbie question. =20 Thank you in advance, Oleg.=20 ------_=_NextPart_001_01C6E885.52E48798 Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable
Hi=20 Oleg,
 
i'm=20 not completely sure, but I think the out-parameters will end up in the = SAX=20 stream instead of them being available in the sitemap after the = transformation=20 stage.
 
Regards,
 
Jeroen=20 Reijn
-----Original Message-----
From: Oleg Konovalov=20 [mailto:olegkon@yahoo.com]
Posted At: Wednesday, October 04, = 2006=20 10:15 PM
Posted To: Cocoon User List
Conversation: = Reading=20 Output params from Stored Proc in sitemap
Subject: Reading = Output=20 params from Stored Proc in sitemap

Hi,

I have 2 output = parameters in=20 stored procedure named ʽroster_idʼ and = ʽerror_textʼ (the stored procedure is=20 executed from create_wip_roster-query2.xml).

If the = ʽerror_textʼ is populated=20 then redirect page to ʽupload_wip_formʼ along with the = error_text=20 value.

If the = ʽerror_textʼ is not=20 populated then redirect the page to ʽwip_rosterʼ form along = with the=20 ʽroster_idʼ value.


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

sitemap=20 entry:

          = ;            =             &= nbsp;=20 <map:match=20 pattern=3D"mbr/create_wip_roster">

          = ;            =             &= nbsp;           &n= bsp;=20 <map:act=20 type=3D"request">

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <map:parameter=20 name=3D"parameters"=20 value=3D"true"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <map:generate=20 src=3D"xml/create_wip_roster-query2.xml"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <!--=20 this xml doc executes a procedure and gives out two output parameters = named=20 roster_id and error_text -->

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <map:transform=20 type=3D"sql">

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:parameter=20 name=3D"company_number"=20 value=3D"{company_number}"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:parameter=20 name=3D"use-connection"=20 value=3D"db_conn"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 </map:transform>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <!--=20 Here I want to check if the error_text is populated then redirect to=20 upload_wip_form,

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;       =20 if not, then redirect to wip_roster does not work. -->

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <map:select=20 type=3D"parameter">

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:parameter=20 name=3D"error_text"=20 value=3D"{error_text}"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:when=20 test=3D"$error_text">

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;=20 <map:redirect-to=20 uri=3D"upload_wip_form?error_text=3D{error_text}"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 </map:when>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:otherwise>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 <map:parameter=20 name=3D"roster_id"=20 value=3D"{roster_id}"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;            = ;=20 <map:redirect-to=20 uri=3D"wip_roster"/>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;           &nbs= p;=20 </map:otherwise>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 </map:select>

          = ;            =             &= nbsp;           &n= bsp;           &nb= sp;=20 <map:serialize=20 type=3D"html"/>

          = ;            =             &= nbsp;           &n= bsp;=20 </map:act>

          = ;            =             &= nbsp;=20 </map:match>

http://apache.org/cocoon/SQL/2.= 0">
   =20 <content>        =
   =20     <sql:execute-query>
   =20         <sql:query name=3D"roster"=20 isstoredprocedure=3D"true">
    =    =20          begin mySP=20 (<sql:substitute-value sql:name=3D"company_number"/>,?,?);end;=20
           =20 </sql:query>
        =    =20 <sql:out-parameter sql:nr=3D"1" sql:name=3D"roster_id"=20 = sql:type=3D"oracle.jdbc.driver.OracleTypes.NUMBER"/>
  &n= bsp;=20         <sql:out-parameter = sql:nr=3D"2"=20 sql:name=3D"error_text"=20 sql:type=3D"java.sql.Types.VARCHAR"/>
   =20     </sql:execute-query>
   =20 </content>
</page>

Sorry=20 for the newbie question.
 
Thank you in advance,
Oleg.

------_=_NextPart_001_01C6E885.52E48798--