Thank you Wim. I will work following your recommendations.
As far as I understand, to use a WResource I should notify the third
party CGI module (end_transaction) the suggestedFileName that I decide
to assign to the WResource object (equivalent to the ASP script file
name) and implement the handleRequest function to manage the
request/response logic. What kind of DispossiontType should I use for
the WResource (Inline or Attachment) ?
Regarding the done() signal, if I am not misunderstanding your
suggestion and the Http::Client example, the Wt library will trigger the
done() signal when the running WServer receives the third party answer.
Is that correct?
Thanks again. Regards.
________________________
Mario Diethelm Guallar
------ Original Message ------
From: "Wim Dumon" <w...@emweb.be>
To: "Mario Diethelm Guallar" <mariodiethe...@gmail.com>;
witty-interest@lists.sourceforge.net
Sent: 10-08-2015 07:25:43
Subject: Re: [Wt-interest] HTTP question
Hello Mario,
To process the result, you can as well use a WResource from Wt instead
of the ASP script.
To know when the request was finished and to act on the response of a
request, connect a method to the 'done()' signal of the client. See
also the code example in Http::Client.
Best regards,
Wim.
On 6 August 2015 at 01:15, Mario Diethelm Guallar
<mariodiethe...@gmail.com> wrote:
Hi,
I am working on the integration of a Wt application (running on an IIS
server under Windows) with a third party local payment system. This
payment system uses two CGI modules to first start and then return
payment transaction results. In a nutshell it works as follows:
- you have to call the first CGI module (start_transaction.cgi) from a
dynamic Web page using an HTTP POST method with some parameters that
you would normally get from the user (transaction amount, user account
id and stuff like that)
- the local payment system validates and processes the request and
then a second CGI module (end_transaction.cgi), informs back
transaction results. To do that, this second CGI module expects a
dynamic Web page (.ASP, .PHP or other similar) that is invoked by the
end_transaction.cgi module and where you can access transaction
payment results and complete the transaction with the corresponding
answer acknowledge
I am planning to use Wt:Http::Cient and Wt::Http::Message classes to
implement this application protocol and I would like to validate some
of my assumptions:
- to activate the first CGI module, I am planning to use the
Wt::Http::Client post(url, message) function, where url is the web
address of start_transaction.cgi and message is a Wt::Http::Message
object with all the requested parameters loaded as "headers" (name,
value pairs).
- to process the results, I am planning to build a little ASP script
(the one that will be used by end_transaction.cgi) that would recover
all the information from the answer and would send it back to the Wt
application using an HTTP POST method
Does it make sense to you? As far as I understand the Wt::Http::Client
post is an asynchronous method so I am a little bit confused about how
to be sure if the first CGI module actually runs and what Http::Client
method do I have to use to get the answer from the ASP script
processing the second CGI module response. Is it possible, as an
alternative answer processing method, to inform the Wt running
application as the dynamic Web page expected by end_transaction.cgi?
If this is feasible, what object and method do you have to use to wait
for this answer?
I would appreciate your comments.
Thanks. Regards.
________________________
Mario Diethelm Guallar
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest