From dev-return-103399-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Wed Mar 14 12:26:38 2012 Return-Path: X-Original-To: apmail-cocoon-dev-archive@www.apache.org Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56141954D for ; Wed, 14 Mar 2012 12:26:38 +0000 (UTC) Received: (qmail 56246 invoked by uid 500); 14 Mar 2012 12:26:38 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 56176 invoked by uid 500); 14 Mar 2012 12:26:38 -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 List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 56168 invoked by uid 99); 14 Mar 2012 12:26:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 12:26:38 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of scherler@gmail.com designates 209.85.214.51 as permitted sender) Received: from [209.85.214.51] (HELO mail-bk0-f51.google.com) (209.85.214.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2012 12:26:31 +0000 Received: by bkwj10 with SMTP id j10so1648810bkw.24 for ; Wed, 14 Mar 2012 05:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=QVAY5zRBLW7zBgKUW3Q7cyEh57ui/sMH+BbGeTZqEYs=; b=J7L5cnOtJxRMPsIBeVC6NSLBcymuLKyQZBzDReATHzumBGGTMGX3MCBLPP749iU4eG 1Qo2aCcZR20xFBZPVU+EHCt9kErunhHndh/EBGvns2uw+6PFxdbCZEayXb9T5RN47gHb ZdqfywhZZl7gi0oZc5AfiXVc+t2dHo/oLsc6i7F2iRoCqYIldQHtE6F4Z76wqIUO9OVE NuatLviUsMcWaSnaYTv1Mf8Mkl4QltEWKMtHp5yNcN8xTuYa2qhFNMnTrTJNEV1bO/LP 0k2vNaHJeZ/Vk9xdgBYLyALN+XEaD+PkQrOQbLnvdJfR1p++zAW104KPQUY5Xp899o/y 8n9A== Received: by 10.204.132.79 with SMTP id a15mr865310bkt.86.1331727970347; Wed, 14 Mar 2012 05:26:10 -0700 (PDT) Received: from [10.0.0.17] (94.168.216.87.static.jazztel.es. [87.216.168.94]) by mx.google.com with ESMTPS id r14sm7604117bkv.11.2012.03.14.05.26.08 (version=SSLv3 cipher=OTHER); Wed, 14 Mar 2012 05:26:09 -0700 (PDT) Message-ID: <4F608E63.7050308@gmail.com> Date: Wed, 14 Mar 2012 13:26:11 +0100 From: Thorsten Scherler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: possible design flaw in servlet service (c2.2) References: <927C66C0775CCA43B88EB1E3006614B306690E33@eu1rdcrdc1wx032.exi.nxp.com> In-Reply-To: <927C66C0775CCA43B88EB1E3006614B306690E33@eu1rdcrdc1wx032.exi.nxp.com> Content-Type: multipart/alternative; boundary="------------040309080809040501000602" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------040309080809040501000602 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 03/14/2012 11:19 AM, Robby Pelssers wrote: > > Hi guys, > > I was just having a chat with my colleague about writing servlet > services in one block and using them in another block. And I told him > apparently you can only return xml from a servlet service. I found > this out by writing a service (plain old XSLT) which takes as input > XML and returns text or in my particular case JSON. > > Whereas this XSLT gets the job done if I use it in a regular pipeline, > I could not use it in a servlet service. Is there a good reason the > output from a servlet service can only be XML? On the docs from C3 > for instance > http://cocoon.apache.org/3.0/reference/html-single/index.html I read > following statement: > > It is the responsibility of the |Producer| to decide whether a > specific |Consumer| can be linked to it or not (that is, whether it > can produce output in the desired format of the |Consumer| or not). > > Does this mean C3 would not have this restriction? > > I am not sure what you are referring to but it strikes me ought "a servlet service can only be XML". Need to find some time to setup a small test myself, but AFAIK the service can return whatever. salu2 -- Thorsten Scherler codeBusters S.L. - web based systems http://www.codebusters.es/ --------------040309080809040501000602 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 03/14/2012 11:19 AM, Robby Pelssers wrote:

Hi guys,

 

I was just having a chat with my colleague about writing servlet services in one block and using them in another block.  And I told him apparently you can only return xml from a servlet service.  I found this out by writing a service (plain old XSLT) which takes as input XML and returns text or in my particular case JSON.

 

Whereas this XSLT gets the job done if I use it in a regular pipeline, I could not use it in a servlet service.  Is there a good reason the output from a servlet service can only be XML?  On the docs from C3 for instance http://cocoon.apache.org/3.0/reference/html-single/index.html I read following statement:

 

It is the responsibility of the Producer to decide whether a specific Consumer can be linked to it or not (that is, whether it can produce output in the desired format of the Consumer or not).

 

Does this mean C3 would not have this restriction?



I am not sure what you are referring to but it strikes me ought "a servlet service can only be XML". Need to find some time to setup a small test myself, but AFAIK the service can return whatever.

salu2
-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/
--------------040309080809040501000602--