cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject [cocoon3] Passing parameters with Invocation
Date Fri, 12 Jun 2009 08:27:09 GMT
Hi all,

I am playing around with cocoon3 for a new custom project. I decided to
give c3 a go because I need the possibility to invoke different pipes
and use their outcome to calculate the response in good old java.

I found some junit tests ( in cocoon-sample)
where I found the Invocation object. Using it in my code works fine as
long I do not pass variables to the pipe.

I am having following sitemap:

<map:match pattern="*">
  <map:generate src="xml/{map:1}.xml"/>
  <map:transform src="xsl/{map:1}.xsl">
    <map:parameter name="firmaElectronica"
    <map:parameter name="hash" value="{jexl:cocoon.request.hash}"/>

When I request http://localhost:8888/validar?firmaElectronica=xxxxx
the <map:parameter name="firmaElectronica"/> correctly uses the value of
the parameter.

In my java code I am doing 
Invocation invocation = this.buildInvocation("validar",stream);
Map<String, Object> parameters = new HashMap<String, Object>();
parameters.put("firmaElectronica", eSignature);

But the parameters are not get picked up. I as well tried

and changing in the sitemap 
<map:parameter name="firmaElectronica"

but that did not worked either.

How can I pass parameter to the invocation that will the get picked up
in the sitemap.

Any hints welcome.

Thorsten Scherler <>
Open Source Java <consulting, training and solutions>

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la InformaciĆ³n, S.A.U. (SADESI)

View raw message