Erik,
I am moving this conversation to the list as it looks like it might be of interest to others (hope you do not mind). The story is that I need to access a database-driven web site not under my control that I need to get data from using screen scraping. The site is a .NET app and uses postback mechanism with state being sent back and forth using __VIEWSTATE POST argument which in this case contains a very long string as a value. With the advice and code change I got from Alex I am able to use the URL generator and do GET data back. However, there are couple of forms that just refuse to be converted to GET method (which the url generator uses) - the server simply does not like that. I have feeling that I will need to do actual POST-ing to the web site to get the server to send me what I need. You are writing that the oxf:xforms-submission processor could receive an XML on its input with application/x-www-form-urlencoded which should probably work for submission, but what will happen when the oxf:xforms-submission processor receives a HTML as a response? A. On Mar 20, 2007, at 5:54 PM, Erik Bruchez wrote: > Alex, > > What does it expect as input exactly? XForms submission are able to > submit using application/x-www-form-urlencoded, for example. > > Same question fo the return data: are you getting HTML back? You > are correct that XForms submission do not support HTML at the > moment, but that could be changed. > > -Erik > > Alexander Zatko wrote: >> Erik, >> The receiving server is not expecting an XML document and also >> does not return an XML. I think that this would cause problems? >> The URL generator is connected with tidy which converts the >> returned HTML into XML. The submission processor does not do this >> - right? >> A. >> On Mar 19, 2007, at 7:17 PM, Erik Bruchez wrote: >>> Hi Alex, >>> >>> Have you looked at the oxf:xforms-submission processor? Would >>> that do the trick for you? The doc is here: >>> >>> http://www.orbeon.com/ops/doc/processors-submission >>> >>> It does not quite behave like the URL generator, but it does a >>> lot of similar things. It is probably also slower as it simply >>> wraps the XForms engine to leverage the XForms submission mechanism. >>> >>> Best, >>> >>> -Erik >>> >>> Alexander Zatko wrote: >>>> Erik, >>>> I need a processor that would behave just like the oxf:url- >>>> generator, but I need it to be able to do POSTs. Can oxf:url- >>>> generator be modified to perform this function? If not, what are >>>> my other options? >>>> I am writing this off-list as I think this enhancement would >>>> require custom programming. >>>> A. >>> >>> --Orbeon Forms - Web Forms for the Enterprise Done the Right Way >>> http://www.orbeon.com/ > > > -- > Orbeon Forms - Web Forms for the Enterprise Done the Right Way > http://www.orbeon.com/ > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Alex,
> I am moving this conversation to the list as it looks like it might be > of interest to others (hope you do not mind). > > The story is that I need to access a database-driven web site not under > my control that I need to get data from using screen scraping. The site > is a .NET app and uses postback mechanism with state being sent back and > forth using __VIEWSTATE POST argument which in this case contains a very > long string as a value. With the advice and code change I got from Alex > I am able to use the URL generator and do GET data back. However, there > are couple of forms that just refuse to be converted to GET method > (which the url generator uses) - the server simply does not like that. I > have feeling that I will need to do actual POST-ing to the web site to > get the server to send me what I need. > > You are writing that the oxf:xforms-submission processor could > receive an XML on its input with application/x-www-form-urlencoded > which should probably work for submission, but what will happen when > the oxf:xforms-submission processor receives a HTML as a response? Currently, with replace="instance", XML is expected and will be parsed, so you will get an error if returning HTML. In the future, we could modify the code to "tidy" HTML code (based on the media type received) and convert it to XML. We have been talking for a long time about modifying oxf:url-generator to support POST, and finally we chose the oxf:xforms-submission option, which has the drawback of being a little heavier, but the benefit of leveraging the XForms code. -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |