I need to call an external app for some interactive stuff. The call to that app allows to pass a URL that will be called upon the user is done on the external site. Our user is woking inside a complex component and eventually needs to go externally for some specific tasks. Going to said external app happens with a POST request and a ton of XML in the request body. I can do this, that’s all working. One item in the posted XML is an (optional) return URL.
How can I create this return URL so that the user transparently comes back to where they left off? I also need to act on this (the user coming back from the external site) to download info about what the user has done over there. This downloading of the results is another XML posted to the external site, their response however is then an XML which I need to parse (that is not a problem).
I am looking for strategies and possible code snippets for such a scenario, particularly the creation of the return URL. I want this to kind of work like the user doing a reload on the current page (a.k.a. return null). I was thinking of passing some parameter along with the URL (?comingBack=true) that will then trigger the request to get back the data from the external site. This could be done in appendToResponse() with checking for comingBack == true.
So my primary issue is how to create a URL for the current component that has the same effect as “reload” (and mind you we are inside a (WO)Session and cannot lose this context).
Thanks for your help and ideas ---markus---
Markus Ruggiero
rucotec GmbH web https://rucotec.ch Leonhardsberg 1 email markus.ruggiero@rucotec.ch 4051 Basel / Switzerland mobile +41 79 508 4701
|