I am building a restful proxy using mule where I have a need to call two web services in a single flow. The call to the first WS is supposed to do user authentication and if the authentication succeeds, then the ORIGINAL HTTP request will be proxied to the correct REST end point by a second WS call. I have a problem after the first authentication web service call returns. When this call returns, the original HTTP request is lost.
How do I retain the original HTTP request that comes in, save it across the first authentication web service call and then set the original headers just before the second web service call?
Please suggest to me the right approach to achieve this.