Hi Henrik,

You will be able to send multiple responses in the up coming 1.1 release of
synapse or if you can get our nightly builds this feature is already there.
You can just call two send mediators in the out flow which will result in
two responses being send to the specified locations. (You should be careful
in handling multiple responses, especially if you try to send both responses
to the same http client synapse will throw a Closed Chanel Exception because
HTTP is request response and hence the client terminates after the first
response)

One good sample for multiple responses would be response back to the client
and also send the response through a mail to some email address. We have
tested this and it is possible. Some times you may have to use clone
mediator to send two responses because otherwise you will hit some header
already present exceptions.

Here is a sample configuration for the two responses using clone mediator;

<definitions xmlns="http://ws.apache.org/ns/synapse";>
  <in>
    <send><endpoint><address uri="$SERVICE_URI"/></endpoint></send>
  </in>
  <out>
    <clone>
      <target><sequence><send/></sequence></target>
      <target><endpoint><address uri="mailto:[EMAIL PROTECTED]
"/></endpoint></target>
    </clone>
  </out>
</definitions>

This will send the request to the specified $SERVICE_URI and get the
response and send a copy of the response to the client while copping the
response also to the email address [EMAIL PROTECTED]

If you encounter any problems in getting this to work, I would be happy to
help through.

Thanks,
Ruwan


On 10/19/07, Henrik Plate <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Is there any follow up on the previous "discussion" about the handling of
> multiple response messages if a sequence contains multiple send mediators?
> (see
> http://mail-archives.apache.org/mod_mbox/ws-synapse-dev/200703.mbox/[EMAIL 
> PROTECTED]
> ).
>
> This topic does not seem to be addressed in the Synapse 1.0 documentation.
> Any plans for future releases?
>
> Thanks and kind regards,
> Henrik
>
> ------------------------------
> For ideas on reducing your carbon footprint visit Yahoo! For 
> Good<http://uk.promotions.yahoo.com/forgood/environment.html>this month.
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Reply via email to