ready to launch
Modrewrite mediator for apache synapse is completed and ready to use. It will be available to public next week onwards. So I thought that it would be useful to put some notes about the functionality of this mediator.
This mediator does some URL manipulations according to a set of rules defined in the synapse.xml. A rule comprises of the followings.
- a set of conditions
- a set of modifications (to be applied if the combination of conditions is evaluated to be true)
The condition elements are interconnected using boolean AND and OR operators. AND operator is given higher priority than OR operator. Once the condition statements are evaluated against the message context, it should return either boolean true or false. If the set of conditions is evaluated to be true, then the properties in the set elements are modified with the given values.
All the values are compared using regular expressions and pattern matching in Java. So users are free to give some wild card values for the properties. For example, [a-z][a-z][a-z]:echo is given above as a value for the soap action. [a-z] can be any character for a-z(lower case). If you want to learn more about regular expressions in Java, this is the place.
Although this is named as urlrewrie, it can do lot more than that. It manipulates some other addressing headers like ReplyTO, SOAPAction, WSAAction, FaultTo, From, etc.
So now it is time to play with URLs and addressing headers.
About this entry
You’re currently reading “ready to launch,” an entry on thilina's blog
- February 15, 2008 / 12:19 pm