HTML Form posting & response parsing


I'm having problems with one strange web system where submitting an
application and making queries about its handling status require a series of
form submits and response parsing - all in HTML. Luckily other interfaces
are "modern" using xml file up/downloads without any difficulties...

I'm not very used to .NET-environment yet, so I'd appreciate some clues
about the classes I should use to implement this stupid interface - stupid
because service user has to take part to bank's internal handling process by
posting some mid-handling-results back to the bank...And the best part was
that the bank's interface documentation just talked about submitting a form
and getting response form without a smallest word about these

Basically the process goes like this:

0. I receive a xml-document and should return another xml-doc to the caller
after making the following queries with the bank.

1. I'll create my own initial html page and post it (https) to the other
server - no
problems here.

2. I get first response from the bank - either:

a) HTML-page with <META REFRESH...> redirection to another page (in case of
errors) - in this case I should get the error code from the next page for
further processing.

b) HTML-page containing a javascript function, a form with hidden fields and
a cookie that is required in further processing at the bank. That
js-function should be called to post the form back to another asp-page at
the bank's site (at least _currently_ it should be enough to just post that
form, but js-call is preferable). No values can be changed in this page, so
the task is just to get the form posted - I don't understand why this has to
made by me and not the bank automatically...

3. After submitting 2b form w/wo the javascript function either:

a) Same as 2a

b) Another HTML-page with hidden form fields with the final values I need to
update to the xml document before returning it to the caller.

I'm constrained to use .NET 1.1, and this function is most likely going to
be used in other programs too, but the first case is inside a message
transformation in BizTalk 2004 (this is the reason for 1.1 constraint).

I started testing with windows form application using WebBrowser control
just to get the content handling part started, but now I really need a hint.
Should I create my own hidden browser (with WebClient/Request etc). that
handles all the cookies, redirections and parses values from html and posts
them back to the bank. And what could be the easiest way to parse the
response html pages in this case.

Or can I somehow use (with .NET 1.1) a web browser like control (although
the final solution is not an application but a function to be used by other
programs) that handles cookies and redirections automatically and makes it
possible to call the javascript function on the bank's form.

I've already lost half my hair in the last two weeks with these undocumented
features I keep running into :-)

Thanks for all the answers in advance.

-- Esa


Relevant Pages

  • What did Anthony encourage as it were all the decorations? We cant withdraw strikers unless Albert
    ... Get your once pursuing emergence in response to my ... Well, envelopes nominate in short fantastic interiors, unless they're ... existing, resigns almost most, as the bank demonstrates toward their ...
  • Re: RTAI vs RTLinuxFree vs 2.6 Kernel + RT Pre-emption patch
    ... want a deterministic turn-around time on our handling of the device ... custom TCP/IP protocol handling. ... we will have about 3-5 mS to process the response and shove it ... "live" data from the device to be part of the constant UDP broadcasting ...
  • Re: Secure file transfer in PL/SQL
    ... Thanks so much for your response. ... I need to send a file to a bank and, since everything else in this new ... few mime headers before the binary data, and then again after the data. ...
  • Re: mod_lisp over CGI
    ... there was a genuine bug in mod_lisp response handling. ... I dont think it will be very useful without handling POST anyway. ... end up handling on the order of 100 req/s per image. ...
  • Re: Can I force my bank to release funds..?
    ... you" and the written request has produced no response. ... I don't have a chequebook with the account, ... The bank manager of a different ...