Hi Olivier
> First  I thought to implement a mediator to insert the cookie in the
> request, but I couldn't find how to modify the http request sent by
> the send mediator.
It seems like you want to set a transport header (i.e. an HTTP header)
on your message before being sent out by Synapse.. for this you could
use the property mediator as follows:

<property name="string" (value="literal" | expression="xpath") 
scope="transport"/>

The name would become the HTTP header name, and the value or expression
would define the value to set.

If you want to write a custom mediator, check the code of the
PropertyMediator from line 113.. you then have access to view, add or
remove transport headers...

 public boolean mediate(MessageContext synCtx) {
...
                Axis2MessageContext axis2smc = (Axis2MessageContext) synCtx;
                org.apache.axis2.context.MessageContext axis2MessageCtx
=  axis2smc.getAxis2MessageContext();
                Object headers = axis2MessageCtx.getProperty(
                       
org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);
...
}

If you are writing a custom mediator, all of the current mediators maybe
useful as 'examples' to help you.. you could also refer to the
documentation on extending Synapse from the home page

asankha

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

Reply via email to