Why not have your win32 process output a file to stdout and then create a custom generator that executes it and parses its output into SAX events? Might be a nice reusable component that will useful for legacy systems integration...
+2c
--
Ilya
Leszek Gawron wrote:
Let's say I have a Win32 executable file that generates xml file somewhere on
the local disk. Now I would like to serialize contents of that file to the
cocoon user, which I wanted to perform like this:
<map:match pattern="test">
<map:act type="serverpages" src="scratchpad/file-create.xsp">
<map:generate src="scratchpad/{filename}"/>
<map:act type="serverpages" src="scratchpad/file-delete.xsp">
<map:serialize/>
</map:act>
</map:act>
</map:match>
This all means:
1. perform file-create action calling Runtime.getRuntime().exec(). This
generates a file somewhere (let's assume I know the file name - I pass the
name as the exec parameter )
2. I generate the web content from the file that was generated 3. I delete the file
4. I serialize the content
What happens? Cocoon reports that the file no loner exists so it gets deleted
before the content get generated. Why is that ? I tried to move the
file-delete action after serialization but there nothing happens - the file
still remains on disk.
I know that this is a crazy idea but that is the only way to have an access to
another application so there is nothing I can change.
__The only thing I need to know is how to delete a file right after its
cotents have been sent to the client.__`
ouzo
--------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>