Update LocalEntry content in WSO2 EI 6.6.0
Asked Answered
A

1

6

I have a LocalEntry named: Test with the content below and saved in the local file system.

<test>
   <value1>a</value1>
</test>

I can retrieve the value1 using a property like this:

<property name="value" expression="get-property('Test')/*[local-name()='value1']/text()" type="string" scope="default" />

But, I can not change the content of the LocalEntry file nither via property mediator nor enrich mediator, my enrich configuration is as follows:

<enrich>
    <source clone="true" xpath="$ctx:newValue"/>
    <target xpath="get-property('Test')/*[local-name()='value1']/text()"/>
</enrich>

I had this exact configuration in ESB-5.0.0 and it worked like a charm.

Why I can not do the same in EI-6.6.0? Is there any alternative solution?

Avant answered 23/6, 2020 at 16:30 Comment(1)
Hi @Reza Ameri, Can you please share the code base for changing localentry content? because i am facing same, need to update access token values to localentry when it expires in programmatically by using wsoe ei 6.1.1?Delfinadelfine
S
0

For saving and loading content, you can use registry. Using property mediator to read and write. There is some downside, that wso2 cache that is read for 15sec. When that is a problem, you cane use more "nasty" method using script mediator. I have described it much more with an example, along with this encountered problem here



Shammy answered 4/2, 2021 at 19:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.