URL Rewriting
Requires version 3.0.0 or above.
Membrane Monitor/Router can change the path URI of a request. A request to
http://router.predic8.com/blz-service?wsdl
can be rewritten to
http://www.thomas-bayer.com/axis2/services/BLZService?wsdl
We want to hide that this service is hosted by axis2. To do this we have to replace the part axis2 from the context path. The hostname is changed by the service proxy. To change the path URI you have to use an URL rewriting feature.
URL Rewriting Feature
To demonstrate how the rewriting works we present here the step by step description how to map the WSDL of the BLZService to a nicer URL.
Start Membrane Monitor and create a simple Service Proxy.

Figure 1:
Specify 2000 as the port number on which the router will listen.

Figure 2:
Than specify thomas-bayer.com as target host and 80 as target port. Next click on Finish.

Figure 3:
To add the URL rewriting feature do right click on the newly created service proxy in the Proxies View and choose edit. Then click onto the XMLConfiguration tab and have a look on it. An XML representation of the Service Proxy is displayied in the main text area of the tab.

Figure 4:
add an URL Rewriting element to the Configuration XML so that your Proxy Service definition looks like.
<serviceProxy name="" port="2000">
<rewriter>
<map from="^/bank/(.*)" to="/axis2/$1" />
</rewriter>
<target host="www.thomas-bayer.com" port="80" />
</serviceProxy>
Click on OK button to apply changes and to save Service proxy configuration.
How it Works
After adding the rewriting feature the RewriteInterceptor is set for the rule. The interceptor will be called during the processing of each request and response.
Now take a closer look at the rewriter element:
<rewriter>
<map from="^/bank/(.*)" to="/axis2/$1" />
</rewriter>
The interceptor is configured with one regular expression /bank/(.*) . This will match the following URIs:
/bank/services/BLZService?wsdl
/bank/services/BLZService
In the regular expression we use a group that we can reference when replacing the URI. The value to replace the URI is given by the uri attribute and is set to /axis/$1 . The $1 is the reference to the group and will contain the value matched by the group. So the above URIs will be replaced by the following:
/axis2/services/BLZService?wsdl
/axis2/services/BLZService
Test URL Rewriting
Test the monitor by opening the URL http://localhost:2000/bank/services/BLZService?wsdl in your browser. You should get the WSDL from the BLZ service.

Figure 5: