Re: Using Class mediator

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Using Class mediator

Lahiru Madushanka-2
Hi Aman,

You can add the resulting string to the message context as a property
public boolean mediate(MessageContext messageContext) {
String result = "This is the resulting String";
return true;
Then, inside the proxy/API we can read that property as below

<?xml version="1.0" encoding="UTF-8"?>
         <class name="mediator.TestMediator"/>
            <property expression="get-property('sampleProperty')" name="Property_from_class"/>


On Wed, Aug 8, 2018 at 5:20 PM Aman Singh <[hidden email]> wrote:
Dear Lahiru,

I have created a custom JAVA class, which produces a "string" as output on running that class.  In my WSO2 ESB, I am calling that class with help of Class Mediator.

Can you please tell me how can I store the value returned by my JAVA class in say a LOG mediator or Property mediator or anything?

Your help would be very much appreciated.

Thank you,

Dev mailing list
[hidden email]