> You need to remove the "To" header to send the response back here.. use the > header mediator > > cheers > asankha
Thx for answer as you see in second answer I have tried this, but there is another problem with aggregation - message seems to go back, but after receiving it seems to immediately stops the aggregation and sends empty answer: <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> <soapenv:Body> <response> <imemptytag/> </response> </soapenv:Body> </soapenv:Envelope> which is aggregated response from only empty_message.xslt : <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="fn xs xsi xsl"> <xsl:output method="xml" omit-xml-declaration="yes" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <response><imemptytag /></response> </xsl:template> </xsl:stylesheet> but there should be also message from other endpoint //flights: <!-- here is the endpoint we want to launch so we setup flights tag to true --> <sequence name="flights-sequence"> <filter source="//book:getPackage/flights" regex="true"> <then> <!-- this should be invoked --> <send> <endpoint> <address uri="http://localhost:8166/" /> </endpoint> </send> </then> <else> <xslt key="transform/empty_message.xslt"> <feature name="http://ws.apache.org/ns/synapse/transform/feature/dom" value="true"/> </xslt> <property name="RESPONSE" value="true"/> <header name="To" action="remove"/> <send/> </else> </filter> </sequence> <!-- we don't want hotels so we set up hotels tag to false --> <sequence name="hotels-sequence"> <filter source="//book:getPackage/hotels" regex="true"> <then> <send> <endpoint> <address uri="http://localhost:8177/" /> </endpoint> </send> </then> <else> <!-- this should be invoked --> <xslt key="transform/empty_message.xslt"> <feature name="http://ws.apache.org/ns/synapse/transform/feature/dom" value="true"/> </xslt> <property name="RESPONSE" value="true"/> <header name="To" action="remove"/> <send/> </else> </filter> </sequence> <proxy name="BookingSystemProxy"> <target> <inSequence> <clone continueParent="false"> <target sequence="flights-sequence" /> <target sequence="hotels-sequence" /> </clone> </inSequence> <outSequence> <!-- this part aggregates only one message response empty response from hotels, no response from flights even they are set up to true - what's wrong? --> <aggregate> <onComplete expression="//response/*"> <send /> </onComplete> </aggregate> </outSequence> </target> </proxy> The logs for this case tells me that: 2008-12-09 14:19:47,718 [192.168.3.17-adr-37ac1b] [HttpClientWorker-4] DEBUG AggregateMediator 1 messages of 2 collected in current aggregation 2008-12-09 14:19:47,718 [192.168.3.17-adr-37ac1b] [HttpClientWorker-4] DEBUG AggregateMediator End : Aggregate mediator 2008-12-09 14:19:47,718 [192.168.3.17-adr-37ac1b] [HttpClientWorker-4] DEBUG SequenceMediator End : Sequence <anonymous> Very strange because it nearly work for me, and very strange if I launch both flights=true and hotels=true aggregation works fine, but not with response made by setting RESPONSE to true (and remove To header). Do you have any idea what happen in this case? Best regards, Adr
