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?

Community
  • 1
  • 1
Reza Ameri
  • 1,803
  • 3
  • 24
  • 32
  • 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? – Justin Sep 30 '20 at 09:37

1 Answers1

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



tmoasz
  • 1,244
  • 2
  • 10
  • 15