Hi all,
I have been looking to implement a simple class mediator to provide the WS-RM
sequence termination. What there is actually needed is that the last message in
the sequence must have a property of last message set to true. So I have built
a very simple class mediator with the following code:
public class SandeshaLastMessageMediator implements Mediator {
public boolean mediate(org.apache.synapse.MessageContext messageCtx) {
Axis2MessageContext axis2MessageCtx = (Axis2MessageContext) messageCtx;
MessageContext orgMessageCtx = axis2MessageCtx.getAxis2MessageContext();
orgMessageCtx.getConfigurationContext().setProperty(SandeshaClientConstants.LAST_MESSAGE,
"true");
return true;
}
public String getType() {
return "SandeshaLastMessageMediator";
}
}
When I include this class mediator in the Synapse flow configuration Synapse
does send a TerminateSequence message to the Axis2 web service that I have
created. However a don't receive a TerminateSequenceResponse message back, but
I have to look into this some more. Another problem that I run into is that
this class mediator only works correct if message flow with some time interval.
However when I send two messages almost directly after eachother to Synapse,
the messages are sent in the same sequence. Can anyone think of a solution to
this threading issue? Is the class mediator implementation not correct?
Thanks,
Tijs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]