Selon Upayavira <[EMAIL PROTECTED]>:What do you mean by 'I get notified of their arrival'? Do you mean that they are sent by FTP to the server, and then the server is informed of their arrival?
[EMAIL PROTECTED] wrote:
Selon Geoff Howard <[EMAIL PROTECTED]>:Why do you want to fire off a pipeline? Because of some kind of side-effect of the pipeline? What do you want to do with the output of the pipeline?
[EMAIL PROTECTED] wrote:Actually, I don't need to re-send a followup message. Anyway, I think JMS is
Hi there and happy new year!JMS
Does anyone know a way to trigger a sitemap pipeline in response to a
notification (onMessage()) ?A general solution for this has been discussed before but never implemented (here at least). Still, this is certainly possible today with a custom component - but could be a lot of work because you'd need to create a full request environment on your own.
But first, I should ask - why? Do you need the response back from the pipeline re-sent as a followup message, or something? Or do you simply need to fire off some business logic which is also done by firing off a pipeline?
Geoff
not important here. I just need to know if there's a way to fire off a pipeline without an HTTP request (even if cocoon is used as a servlet)?
There are ways, but it depends upon what you're trying to achieve.
Regards, Upayavira
I need to "prepare" some static XML files (mainly XSLTransformations) to be later processed/served by a Cocoon-based webapp. Those XML files are dropped on an FTP server and I get notified of their arrival... Since I use cocoon (as a servlet) I don't want to write an independant Xalan piece of code :)
I would say, using some combination of flow, HTTP post, the StreamGenerator and processPipelineTo might do you nicely.
That way, whatever starts the process off posts the raw data to Cocoon, in XML, using HTTPPost. In flow, you use code like:
var fis = new java.io.FileInputStream(new java.io.File("yourfile.xml"));
cocoon.processPipelineTo("stream-pipeline", fis);
cocoon.sendPage("show-success");
That way, the contents of the stream are transformed in a pipeline and then written to disk.
Alternatively, you could use the SourceWritingTransformer to do it.
I would recommend using HTTP to transfer data, rather than FTP. FTP is an antiquated and complex protocol, and, as you have seen, has no capacity to notify of delivery. Whereas, when data arrives via HTTP, you are free to take that data and place it wherever you want.
Hope this helps.
Regards, Upayavira
Enrico
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
