Read XML content of the LocalEntry in WSO2 ESB

Local Entry is one of the data storage points in the WSO2 Enterprise Service Bus, where you can store text strings, XML content, and File URLs.  I have been asked a question that, how can we read the content of the local entry if it as an XML file.

Below is an example to read the content of the local entry(Name: NameOfLocalEntry) and assign the value of XML elements as properties. 

Content of Local Entry:

<?xml version="1.0"?>

Synapse Configuration: 

<property name="localEntry" expression="get-property('NameOfLocalEntry')" scope="default" type="OM"/>

<property name="userName" expression="$ctx:localEntry//*[local-name()='userName']"/>
<property name="URL" expression="$ctx:localEntry//*[local-name()='URL']"/>


Popular posts from this blog

XSLT - Modify Date and DateTime value

Yield Price Sri Lanka - Android Application

Integrate With Mutual Certificate Authentication based Service