Hi, The original StreamGenerator makes a difference between form-data like and text/xml like content-types. The first scans for parameters, the second provides access to the request body. So, yes, content-type is highly relevant here.
If you are submitting XML with a HTML form, you can access it with the streamgenerator by passing a parameter to the generator that tells the generator which parameter is should 'stream'. Typically you have a (multiline) text field on your form with a name like myxml or mytext. To stream that, configure your streamgenerator as follows: <map:generate type="stream"/> <map:parameter name="form-name" value="myxml" /> </map:generate> Note: the requestgenerator is capable of parsing xml containing parameters as well (as long as they are marked with xml:), though you probably don't need all the extra information.. :-P Kind regards, Geert > Drs. G.P.H. Josten Consultant Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 www.daidalos.nl KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. > Van: Fawzib Rojas [mailto:[EMAIL PROTECTED] > Verzonden: dinsdag 3 oktober 2006 15:56 > Aan: users@cocoon.apache.org > Onderwerp: Problem with custom StreamGenerator > > I have a custom StreamGenerator and it is giving me some > problems. I have used it with a custom application I've made > and it works. I send a POST with my information and I can use > the posted info in my custom generator. My problem is that > when I use an actual FORM with a post message it fails. > > This is the HTTP message from my app: > > POST /servers HTTP/1.0 > Connection: keep-alive > Content-Type: text/xml > Content-Length: 99 > Host: 192.168.10.125 > Accept: text/html, */* > Accept-Encoding: identity > User-Agent: Mozilla/3.0 (compatible; Indy Library) > > <post_data_removed> > > This is what Firefox sends when I submit the form: > > POST /msim/SamplePackage.pdf HTTP/1.1 > Host: www.spectron-msim.com > User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; > rv:1.8.0.7) > Gecko/20060909 Firefox/1.5.0.7 > Accept: > text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 > ,text/plain;q=0.8,image/png,*/*;q=0.5 > Accept-Language: en-us,en;q=0.5 > Accept-Encoding: gzip,deflate > Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive: 300 > Connection: keep-alive > Referer: <removed> > Authorization: <removed> > Content-Type: application/x-www-form-urlencoded > Content-Length: 57 > > <post_data_removed> > > > I think that since the 'Content Type' is > 'application/x-www-form-urlencoded' Cocoon is trying to > process it before my generator deals with it. I tried adding > ENCTYPE='text/xml' to my form but it seems Firefox and IE > ignore it because I always get > 'application/x-www-form-urlencoded'. Can anyone give me a hand? > > --------------------------------------------------------------------- > 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]