Selon Upayavira <[EMAIL PROTECTED]>:
> [EMAIL PROTECTED] wrote:
>
> >Selon Upayavira <[EMAIL PROTECTED]>:
> >
> >
> >
> >>[EMAIL PROTECTED] wrote:
> >>
> >>
> >>
> >>>Selon Geoff Howard <[EMAIL PROTECTED]>:
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>[EMAIL PROTECTED] wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Hi there and happy new year!
> >>>>>
> >>>>>
> >>>>> Does anyone know a way to trigger a sitemap pipeline in response to a
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>JMS
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>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
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>Actually, I don't need to re-send a followup message. Anyway, I think JMS
> is
> >>>
> >>>
> >>>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)?
> >>>
> >>>
> >>>
> >>>
> >>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?
> >>
> >>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 :)
> >
> >
Thanks for all Upayavira,
> 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?
That's it. The FTP server writes events into an IPC message queue.
Unfortunatly, without JNI it's hard to program something in Java that
could communicate with IPC. So, a Perl script does the job. So far, the
script does the XSLT too. But it is not flexible at all, that's why I'd
like to send the raw XML files to by Cocoon, maybe via HTTP (or, at the
begining at this thread I was thinking about some kind of MoM).
But without JNI, I am compelled to write a Perl HTTP client to send the XML
files to Cocoon :(
>
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]