cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <>
Subject Re: POST XML to cocoon protocol
Date Thu, 27 Jan 2005 13:33:50 GMT
Daniel Fagerstrom wrote:
> Irv Salisbury III wrote:
>> I want to use the CIncludeTransformer to call another pipeline and 
>> pass it XML using the POST mechanism.  Before posting this question, I 
>> tried to make my way through the Source code, eventually finding my 
>> way to the SitemapSource class.  It doesn't look like the cocoon: 
>> protocol allows for POST.  Is this the case?
> The cocoon: protocol doesn't support POST.

The cocoon: protocol does not support GET either. As a matter of fact, it is not 
an HTTP protocol at all. What it does support though, is cocoon: protocol URI 
which allows for request parameters.

You can always stick your XML into request attribute. I'm puzzled though, why 
would anyone need to do something like this ...

> It is not very likely that it 
> will either. I added POST support to the HTTP: protocol in Bugzilla 
> ( for web 
> serivce support. But some people at the list thought that it was going 
> outside the intended scope of resources to make them postable.

You sure did went outside of the scope :-) It's good functionality to have in 
something like HTTPRequestTransformer, but not in SourceWritingTransformer or 
CIncludeTransformer (the new transformer, IncludeTransformer, does not have such 

>> I guess a side question is, is there a better way to pass XML to 
>> another cocoon pipeline as input to it.  It is pretty easy to call 
>> another pipeline and get its output, but I want to pass XML to another 
>> cocoon pipeline.
>> I'd be fine with a solution that uses flowscript.
> I think the easiest way is using flowscript. You can use the 
> ModuleSource, "module:request:inputStream" 
> ( to get the input stream.
> Then you can use 
> org.apache.cocoon.components.flow.util.PipelineUtil.processToDOM to get 
> the content to a DOM that you after that can put into the pipeline with 
> e.g. JXTemplateGenerator.

Hm. I'd probably go with using request attribute and then generating XML 
directly from there in the included pipeline - no JX and no Flow. It depends on 
usecase, of course.

> /Daniel
> P.S.
>> I am not on the dev list, so if you could copy me in on the answer, 
>> that would be great!
> It is considered slightly impolite to ask for private copies as it hints 
> that you only want something from us and not are going to contribute. 
> And that can reduce the chance for geting answers. See e.g. 
> and 
> You can always read answers through archives: 
> e.g.



View raw message