Tuesday, March 3, 2015

String concatenation in WSO2 ESB

There may some incidents where we want to concatenate two strings and create new string (value of a property ) in WSO2 ESB. Here I am using two property values and join them in to a new property.

1. Property #1

 <property name="myFirstProperty" value="WSO2"/>  

2. Property #2

<property name="mySecondProperty" value="ESB"/>

3. Concatenating above two properties

 <property name="ConcatenatedProperty" expression="fn:concat(get-property('myFirstProperty'),get-property('mySecondProperty')"/>

Note: You can provide any number of values to be concatenated in to the fn:concat() function.

Value of "ConcatenatedProperty" property is "WSO2ESB"


1 comment: