Welcome!

XML Authors: Sue Poremba, Pat Romanski, Maureen O'Gara, Security Gateways, Hollis Tibbetts

Blog Feed Post

Using Search and Replace with the Vordel Gateway

Recently I set up a simple Search and Replace policy using the Vordel Gateway. Here is how I configured this. For the purposes of this blog post, I'm replacing the text "Monday" with "Tuesday".

The string replacement is achieved in a small number of filters, and the main work (the actual search and replace) is done in the "String Replace" filter. Let's look at this in action:

Starting from the top, I am using a "Retrieve from Message" filter to read the whole message into a variable, which I'm calling "ReplacementExample". I am reading the entire message, using a "/" XPath Expression.





Next, here is where I am using the "String Replace" filter, to simply replace the text "Monday" with "Tuesday". You can see that if I wanted to use a Regular Expression for a more complex scenario, I could configure this here too.

Finally we see the policy in action. I'm using the free SOAPbox tool as the client. You can see that the day information in the message is automatically replaced by the "String Replace" filter.

Read the original blog entry...

More Stories By Mark O'Neill

Mark O'Neill is Chief Technology Office of Vordel. Vordel connects applications to applications, businesses to other businesses, and SOA to Cloud Computing. A regular speaker at industry conferences and a contributor to SOA World Magazine and Cloud Computing Journal, Mark holds a degree in mathematics and psychology from Trinity College Dublin and graduate qualifications in neural network programming from Oxford University.