Sanjesh

I assume you place your mediator within the <in> and <out> sections of your rules which you define as the request and response phase. The mediate method itself does not have a concept called a request phase or response phase etc. As soon as you place your mediator in more than one location in the configuration, it actually creates two (or more) distinct instances of your mediator, and these cannot share state by default, unless you make them.

However, if you set a property with the name prefixed as "correlate/", you will have this property in the response phase as well. See the sample configuration synapse_sample_2.xml under repository\conf\sample in svn. Any properties prefixed with the above will automatically get copied onto the response message when it passes through a send.

hope this helps
asankha

Sanjesh Pathak wrote:

Hi,

 

I have created a new mediator and it is working fine. Now I want to set a property value in the request phase of the mediate method and retrieve it in response phase. What is the right approach?

 

I tried using msgContext:setProperty() in request phase and when I retrieve it using msgContext :getPorperty() I am getting a null value.

 

Sanjesh

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to