cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <scher...@gmail.com>
Subject Re: possible design flaw in servlet service (c2.2)
Date Wed, 14 Mar 2012 12:26:11 GMT
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/


Mime
View raw message