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 (SitemapBuilderTest.java 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"
value="{jexl:cocoon.request.firmaElectronica}"/>
<map:parameter name="hash" value="{jexl:cocoon.request.hash}"/>
</map:transform>
<map:serialize/>
</map:match>
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);
invocation.setParameters(parameters);
invoke(invocation);
But the parameters are not get picked up. I as well tried
invocation.setObjectModel(model);
and changing in the sitemap
<map:parameter name="firmaElectronica"
value="{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.
salu2
--
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>
Sociedad Andaluza para el Desarrollo de la Sociedad
de la Información, S.A.U. (SADESI)