Yet another approach is to use STX.   

STX processor in cocoon is Joost (http://joost.sourceforge.net/) which 
implements external-filter , one of which is POST (maybe you'll have to update 
the .jar to the most recent version, it's painless, just stop tomcat/cocoon, 
remove the old jar and replace with the new one, and restart).

The joost documentation says (from the web site):

] Using external SAX2 filters

] Joost implements the usage of external SAX2 filters as described in the WD of 
the STX specification section 4.19 (CVS version Jul 23 
] 2003). Joost uses the TrAX API to instantiate an XSLT transformer object. The 
actual XSLT implementation (i.e. the 
] javax.xml.transform.TransformerFactory) to be used may be controlled by 
setting the property 
] net.sf.joost.trax.TrAXConstants.KEY_XSLT_FACTORY, either as a system property 
or using TransformerFactory.setAttribute.

] Besides the XSLT (http://www.w3.org/1999/XSL/Transform) and STX 
(http://stx.sourceforge.net/2002/ns) filter methods, Joost provides 
] built-in implementations for the following two additional values of the 
filter-method attribute:

(blah blah..)

**] http://www.ietf.org/rfc/rfc2616.txt#POST
**]     Sends the filter input data per HTTP-POST request to the URL specified 
in the required target parameter (i.e. <stx:param 
**] name="target" ... >). The data of the HTTP response are the result of this 
filter. The HTTP-POST filter can be used to access web 
**] services from STX.

I never try, but I will shortly (like.. Today) for exactly the same reasons 
Sébastien (to fetch data from a remote WFS).  STX is a bit more tricky that 
XSLT but in a simple series of WFS calls, it should be quite obvious.  The 
great benefit of STX is that it's SAX driven (so I don't expect it should build 
a big buffer - GML documents tends to be quite large)

Wish me the best.

Eric



-----Message d'origine-----
De : Sébastien Geindre [mailto:[EMAIL PROTECTED] 
Envoyé : 17 janvier 2008 05:03
À : [email protected]
Objet : Re: IncludeTransformer


>> Second approach : use transformer given by franco 
>> (http://www.mail-archive.com/[email protected]/msg39623.html), 
>> but it seems to not be compatible with C2.2.
>>
>> public class HTTPPostTransformer
>>        extends AbstractTransformer
>>        implements Recyclable, Composable { ...
>>
>>
>> this transformer, written for C2.1, is based on AbstractTransformer.
>> it has compose method which set the manager.
>> Does it still work in C2.2 ?
>>     
>
> I think it should work as long as you replace Composable with 
> Serviceable interface and compose() with service() method. However, if 
> you write your own components from scratch I would suggest to write them as 
> Spring beans instead of Avalon components.
>
>   
implements Serviceable make it works...
I am not used with Spring beans... any cocoon links to how make a cocoon 
transformer based on spring beans ?
thanks again Grzegorz!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to