I'm trying to call two endpoints with clone and gather their information to send with aggregate, I must use it with scatter-gather mediator. Each endpoint returns a string in json. But I keep having a "Expecting an implementation of SOAP Envelope as the parent" error. My last attempt is below. What should I use in onComplete expression to make this work?
<resource methods="GET" uri-template="/allInfo">
<inSequence>
<log description="Get All Restaurants Info" level="custom" separator=",">
<property name="message" value=""All information of restaurants""/>
</log>
<clone description="All Info" id="ScatterGatherProxy">
<target>
<endpoint key="RestaurantLocalsEP"/>
</target>
<target>
<endpoint key="RestaurantNamesEP"/>
</target>
</clone>
</inSequence>
<outSequence>
<aggregate id="ScatterGatherProxy">
<completeCondition>
<messageCount max="-1" min="-1"/>
</completeCondition>
<onComplete expression="fn:concat('//*')">
<send/>
</onComplete>
</aggregate>
</outSequence>
<faultSequence/>
</resource>