Sébastien Geindre pisze:
>
>> I see your saga with calling an external service continues
> It's a real saga !!! I am writing the season 2 !!!
>
>> what exactly http header parameters you need to set while
>> calling your service?
>>
> i wrote a WFS transformer which take a WFS xml request and make the http
> post request to a WFS webservice. This transformer need that ALL the xml
> stream is a WFS request. It is build on httpclient library...
>
> public class WFSProxy extends AbstractDOMTransformer {
> ...
>
> protected org.w3c.dom.Document transform(org.w3c.dom.Document document)
> {...}
>
> in transform method, i make the http request...
> Very simple, nothing to parse...before requesting. This is OK.
>
> Now i need to make a transformer which take a subset of xml data and
> make the request.
>
> First approach : use CIncludeTransformer !!
> It makes the httprequest, but it seems that some http parameters are not
> set...
> Which one ? That's the questions...
> How can i log the http header of a request made by CIcludeTransformer ?
To be honest, I have no idea... I fear only looking at source code can give you
an answer.
> 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.
> In fact, the http post is made, but it fell in parsing the response
> because the transformer is not enable to find a parser :
>
> FilterContentHandler lFilterContentHandler = new
> FilterContentHandler(this);
>
> lSAXParser = (SAXParser)
> this.manager.lookup(SAXParser.ROLE);
>
> lSAXParser.parse(lInputSource, lFilterContentHandler);
>
> How can i handle it in C2.2 ?
What's exactly the exception thrown? This should work ok.
> Third approach (season3 !!!) : C2.2 block !!!
Third approach would be implementing your own servlet making WFS call and using
postable source but
it won't be much easier so I think writing transformer makes sense in this case.
> thanks for helping.
No problem.
--
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]