cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Lucas-Smith <michael.lucas-sm...@wizardis.com.au>
Subject Re: Flowscript and POST's
Date Mon, 22 Dec 2003 04:22:42 GMT
Monday, December 22, 2003, 12:05:07 PM, you wrote:

I've dug a little deeper. I've made my backend match use the wsproxy
generator and now it almost 'just works'.

When I say 'just works', the values in the POST have been sent to the
backend, without anything special required, but the values of the POST
have been sent as parameters!

I assume this is a bug in the wsproxy generator, as I've told the
wsproxy generator to use a wsproxy-method of POST - which it does, but
then proceeds to use parameters instead of body content.

Apart from this slight problem, which may not ever be a problem,
things are back on track.

Cheers,
Michael

MLS> Hi,

MLS> I'm new to this crowd and I'm no Cocoon expert.
MLS> I've just started to play with the flowscript part of Cocoon and have
MLS> found it very interesting.

MLS> I've got an immediate use I can put it to in one of my company's
MLS> projects, but my lack of understanding has left me with a problem.

MLS> I have a situation where Cocoon is the web front end to a backend
MLS> system. Cocoon requests XML from the backend system.
MLS> I have some XSLT that outputs input forms against the XML's original
MLS> data and allows the user to POST in changes to the document.

MLS> I'd like to use flowscript to switch which page the user sees
MLS> depending on the success/failure of the backend operation.

MLS> Thus far I have:

MLS> <match pattern="**/*.form">
MLS>        <call function="submit">
MLS>              <parameter name="actionurl"
MLS>              value="resource/{1}/{2}.server"/>
MLS>              <parameter name="success" value="success.html"/>
MLS>              <parameter name="failure" value="../{1}/{2}.html"/>
MLS>        </call>
MLS> </match>

MLS> function submit() {
MLS>          var result = new
MLS> Packages.java.io.byteArrayOutputStream();
MLS>         
MLS> cocoon.processPipelineTo(cocoon.parameters.actionurl, {},
MLS>          result);
MLS>          result = result.toString();
MLS>          cocoon.redirectTo(cocoon.paramters.failure);
MLS> }

MLS> The POST goes to the .form match which then calls the flowscript.
MLS> Unfortunately, there doesn't appear to be an obvious way to POST on
MLS> this POST to the backend pipeline, which I was hoping to do using
MLS> processPipelineTo with my actionurl parameter.

MLS> Has any one got any idea how I can 'push' that POST on to my backend
MLS> easily?




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message