On 11 Jul 2007, at 11:14, Ruwan Linton wrote:

Hi Nick,

Please see the comments in line in the mediator code;


---

Code Using injectMessage
------------------------

public boolean mediate(MessageContext ctx) {
         final SynapseEnvironment env = ctx.getEnvironment();

         final MessageContext newCtx = env.createMessageContext();



I think the above line is where you are doing something wrong, because it seems that your newCtx does not have a Axis2 ConfigurationContext associated
with it.

Use the following method to get the newCtx instead and try,

final MessageContext newCtx = new Axis2MessageContext (((Axis2MessageContext)
ctx).getAxis2MessageContext(), ctx.getConfiguration(), env);

Just give it a try and let me know if there are any issues.




- actually it doesn't work. It seems I need to create a completely new Axis2MessageContext because the above shares the same underlying context between the message I am trying to inject and the original message associated with "ctx". Hope this makes sense.

Nick


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

Reply via email to