cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Erzegovesi" <luca.erzegov...@economia.unitn.it>
Subject How to POST XML content produced by a pipeline with HttpProxyGenerator?
Date Sat, 19 Jul 2003 18:05:44 GMT
Hi. I am an end user, new to Cocoon. I am experimenting with 2.1m3.

First, let me spend a few words about the use case that originates my question.
I am developing a document management system for semi-structured data using XMLspy Authentic
browser plugin as XML editor on the client side, and MS SQLserver as the document repository.
Saving of documents is performed using updategrams, a technology embedded in MS SQLXML. Updategrams
are files containing an XML representation of the Db records affected before and after the
Db transaction, and rely on a schema which maps relational tables onto XML elements. Updategrams
are translated into SQL INSERT, UPDATE and DELETE statements.
I started my project developing on the "nanonews" example provided on the XMLspy web site,
where the server side processing is based on ASP pages. Soon afterwards I releazed that Cocoon
would be a better platform to manage in an orderly way the flow of data to and from SQLserver,
which involves a complex sequence of XSL transformations between the XML needed by the XML
editor and the one loaded from or saved to the DB.

Getting to the point, I am happy to say that my attempts so far have been successful: I have
managed to load the DB data into the XML editor, and also have been able to make a pipeline
assembling a valid updategram. As a provisional solution, the updategram is saved it to a
file and then is executed with a GET request.
Now I would like to take the final step, i.e. skipping the file save step and POSTing the
updategram to an URl referencing the virtual directory of SQLXML.
I supposed that HttpProxyGenerator, which I found in the blocks section of 2.1m3 may be the
right tool for the job, as it POSTs XML content passed as parameters to an URL (thanks to
Pier Fumagalli for an <a href='http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=104491857707687&w=2'>informative
message</a> on cocoon-dev list explaining its use, I had it working with no trouble)
. Now, the XML I need to post is the output of a pipeline. How could it be assigned to the
parameters of the HttpProxyGenerator?
I suppose that the most elegant solution would be a HttpProxyTransformer receiving the XML
to post as input form the previous steps of the pipeline, but I am not ready for extending
Cocoon components. Another solution may avail of the WriteSessionDOM transformer. Is there
some other way to do that? 
Thanks for any advice.
Luca Erzegovesi
University of Trento
Mime
View raw message