cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <>
Subject Re: Custom extensions - to be made available if possible
Date Thu, 09 Sep 2004 11:51:56 GMT
Antonio Fiol BonnĂ­n wrote:

>>I have implemented something like that, see:
>> It is not yet
>>part of Cocoon as we have differing opinions about the design as you can
>>see in the Bugzilla entry and also in the thread:
>Thank you Daniel.
>My approach was, in fact, much simpler.
>It is a very simple transformer.
>You can configure (in the sitemap, src attribute for the transform
>element) the URL to post to.
>Everything in the input is posted.
>The response is piped back "alone", without anything around.
>Of course, your approach is probably much better.
I'm not so certain that my approach is better. When I designed the 
stuff, my first idea was to write something like what you describe. The 
advantage with my approach is that you can embed the web service call in 
an XML document that contains other stuff and that you can make several 
web service calls at once. The disadvantage is that if you have to embed 
your message to the web service in XML tags and strip of XML tags from 
the output. For many use cases you don't need the flexibility you get 
from my approach, it just complicates thing. If your input and/or output 
documents from the web service are large it can also be quite costly to 
add and strip away tags.

So as a conclusion I think that your approach would make a usefull 
adition to Cocoon. If you use the "postable" http source that I 
submitted in the Bugzilla entry, It would be quite easy to write, (read 
the thread cited above first for other opinions, however).

Another thing tha might be worth mentioning is that if you need more 
detailed error control or need to do some decisions based on the output, 
it is often better to call the web service from a flowscript, (you can 
find some example code in the bugzilla entry).


View raw message