Hi,
I'm a bit confused of how Membrane works in some aspects and think I could need some help.
I'm using the standard <rewriter> interceptor in a <serviceProxy> to route incoming requests to an external service. Since the destination URL requires some more advanced rewriting than what can be achieved with the <map> element, I was thinking about "post-processing" the mapped destination URL in a Groovy interceptor (e.g. with a script line like: exc.request.setUri(...)).
I have tried this, but it doesn't seem to work. While on the Calls page in the Membrane admin console I can see the post-processed URL showing up in the Path column, from the response I observe in the browser it seems the request is still dispatched to the non-post-processed URL!
What is also confusing to me is that the Groovy interceptor seems to be executed twice for every request (I have a println statement in it, so can see this in the logs). This inspite of the fact that the interceptor is nested in a <request> element.
Would be grateful for some help here. I guess it a way to understand a bit better what is happening would be to enable DEBUG/TRACE level logging, however, this also I am having some difficulties with... :).
/ Mats