Hey Nima, 2009/8/6 Nima <[email protected]>: > Hi, > > I'm a newbie to wt and this is the second time that I'm posting without > getting > any answer, so I have decided to repost my problem and explain it a little > more.
Sorry for the late response: I did mark your previous message (from four days ago) as "todo" but usually only respond to the mailing list in batches... > I have implemented a simple wt application, that accepts HTTP requests from > clients. The main goal of this application is to integrate MoneyBookers > payment > gateway. Basically, the application consists of two parts: > > part 1) the application accepts HTTP requests from clients, and redirects them > to MoneyBookers webpage. > > part 2) the application accepts HTTP requests from MoneyBookers server, and > should modify the database accordingly. > > I have no problem with "part 1". in part 1 the application creates a session > for > each client and processes that request. But, I am not able to implement part > 2. > The problem with this part is: > > The moneybookers server sends an HTTP request, and closes its connection when > it > receives the "OK" message from my server, thus my wt application never > creates a > session for this request and simply drops the message. Okay, I understand what you want and I also see why Wt does not get you very far. Wt uses a simple bootstrap procedure that consists of 2 requests, before it gives control to user code to setup the application. The "OK" message is simply the http 200 status, right ? I could see 2 possible ways of solving your problem: 1) Can you indicate a URL that moneybookers server should access, which includes arguments ? In that case, you could give it the URL of a WResource, and then you can simply handle the request from within the WResource. The benefit of this approach is that you could keep all the logic in one Wt session. 2) Use Wt's exception for bots, to skip the bootstrap procedure. The bootstrap procedure mainly serves to differentiate between JavaScript and non-JavaScript agents, but bots can always be treated as user agents that do not have JavaScript. I recommend that you add the user agent that matches the moneybookers server in the <user-agents type="bot"> list of your configuration file. In this way, the first request will result in a session, and you can parse the arguments from the WEnvironment object. Regards, koen ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
