Search code examples
wso2apache-synapsewso2-esb

Get content of local-entry into property


I have a local-entry containing text. I want to use the text of the local-entry in my proxy sequence. But how can I do that? I only have get-property('name of property'), but is there a get-local-entry('name of local entry'?

Here my Proxy in which I want to get the local-entry content:

<proxy xmlns="http://ws.apache.org/ns/synapse" name="MyProxy" transports="jms">
    <parameter name="transport.jms.Destination">MyQueue</parameter>
    <target faultSequence="faultSequence">
        <inSequence>
            <!-- HERE I WANT TO ACCESS MY LOCAL-ENTRY -->
            <property name="myLocalEntry" expression="get-localEntry('asdf')"/> 
            <!-- then here i parse my data... -->
        </inSequence>
    </target>
</proxy>

This is an example of the local-entry I need to access:

<localEntry xmlns="http://ws.apache.org/ns/synapse" key="MyLocalEntry">
    My Local Entry Text
</localEntry>

How can I get the local-entry text into my sequence?


Solution

  • You can use

    get-property('MyLocalEntry') 
    

    to get the local entry text