On Tue, 27 Jul 2004 14:57:08 +0200, Daniel Fagerstrom <[EMAIL PROTECTED]> wrote:
> >I was thinking about using SWT as well, but then I realized that SWT > >doesn't offer a way of inserting the resulting XML in the original > >stream: all it does is delete the XML inside the <source:write/> > >element, providing some status information (see SWT#reportResult()). > >Am I missing something? > > > I have extended SWT so that you can post XML as well: <source:post/>. Oh, I see. Well, I spent a few brain cycles on it, and I have to admit that I'm not convinced that the Source/SWT way is the way to go. The idea of a Source, to me, is that whatever I write to it can be read back at the same location: this happens with files and with HTTP as well (if you PUT and GET). POST is a different beast and it belongs to RPC rather than to streams. Same issue goes for SWT. Apart from having quite a few discussions about it (as it "tees" the pipeline, which - design wise - is not a good idea for many of us), it wasn't quite conceived to do this job. Also, I haven't seen your implementation, but is it compatible with the "old" SWT output in terms of the resulting XML or will it break compatibility? All in all, I'd rather favor the transformer approach ATM: it seems to me that it fits much better in the overall Cocoon architecture: you build your request inside the pipeline, pass it through a component which performs the POST and grab the result (something you can, besides, do a using a cocoon:// src to the WSProxyGenerator). But I'm open to change my mind. Anyone else cares to comment? -- Gianugo Rabellino