Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 31802 invoked from network); 27 Jul 2004 14:04:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Jul 2004 14:04:20 -0000 Received: (qmail 81132 invoked by uid 500); 27 Jul 2004 14:04:00 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 80915 invoked by uid 500); 27 Jul 2004 14:03:57 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 80813 invoked by uid 99); 27 Jul 2004 14:03:55 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_BY_IP,SB_NEW_BULK,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [216.239.56.245] (HELO mproxy.gmail.com) (216.239.56.245) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 27 Jul 2004 07:03:52 -0700 Received: by mproxy.gmail.com with SMTP id w29so3511851cwb for ; Tue, 27 Jul 2004 07:03:50 -0700 (PDT) Received: by 10.11.118.74 with SMTP id q74mr91897cwc; Tue, 27 Jul 2004 07:03:50 -0700 (PDT) Message-ID: <7557e99f0407270703266fbe40@mail.gmail.com> Date: Tue, 27 Jul 2004 16:03:49 +0200 From: Gianugo Rabellino To: dev@cocoon.apache.org Subject: Re: Calling web services from Cocoon In-Reply-To: <41065124.7030403@nada.kth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <4105114E.6020303@nada.kth.se> <7557e99f04072703311e44858a@mail.gmail.com> <41065124.7030403@nada.kth.se> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Tue, 27 Jul 2004 14:57:08 +0200, Daniel Fagerstrom 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 > >element, providing some status information (see SWT#reportResult()). > >Am I missing something? > > > I have extended SWT so that you can post XML as well: . 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