Showing posts from June, 2016

Dynamically Selecting SOAP Message Elements in WSO2 ESB

Most recently I faced a requirement where I had to select elements dynamically from a SOAP response message which comes to WSO2 ESB. The use case is as follows.

I have a proxy service where I get a request from a client and let's say the request looks like following.

1: <Request> 2: <Values> 3: <value>2</value> 4: </Values> 5: </Request>
The value can be changed for each request. However when the request is sent to the backend server from ESB we get a response as following

1: <Response> 2: <Events> 3: <Event><TestEntry>Entry Val1</TestEntry></Event> 4: <Event><TestEntry>Entry Val2</TestEntry></Event> 5: <Event><TestEntry>Entry Val3</TestEntry></Event> 6: <Event><TestEntry>Entry Val4</TestEntry></Event> 7: <Event><TestEntry>Entry Val5<…