Hi Niranjan,
Can you please try putting respond mediator after the aggregate mediator.
You can use send mediator as well instead of respond mediator.
<outSequence>
<aggregate id="id1">
......
.....
</aggregate>
<respond/>
</outSequence>
Thanks,
Nuwans
On Sat, Nov 5, 2016 at 7:17 PM, Niranjan Karunanandham <[email protected]>
wrote:
> Hi Nuwan,
>
> Thanks for the prompt reply. Please find my inline comments below.
>
> On Sat, Nov 5, 2016 at 6:02 PM, Nuwan Wimalasekara <[email protected]>
> wrote:
>
>> Hi Niranjan,
>>
>> Once you put a respond mediator, the message send back to client and
>> mediation should be stopped. So having mediators after respond will be not
>> executed. if you need to call the back end service agin, use call mediator
>> and finally call the respond where the message send back to client.
>>
> Yes, I am using the respond mediator at the end. This works fine if I
> create using the UI. But when I try to do it using the Dev studio, I get
> this error. It always me to save, but when I reopen this file, I get the
> above said Warning message and it also removes the code. So even though it
> is a warning, it is changing the actual code. This is the code:
>
> <outSequence>
> <aggregate>
> <completeCondition>
> <messageCount max="-1" min="-1"/>
> </completeCondition>
> <onComplete expression="/"
> xmlns:n="http://www.wso2.org/brs/sample/"
> xmlns:ns3="http://org.apache.synapse/xsd" xmlns:soapenv="
> http://www.w3.org/2003/05/soap-envelope">
> ....
> <enrich>
> ....
> </enrich>
> <call blocking="true">
> <endpoint>
> ....
> </endpoint>
> </call>
> <respond/>
> </onComplete>
> </aggregate>
> </outSequence>
>
> Also if I put this into a sequence and refer it in the out sequence then
> it does not work (if I do this via the Dev Studio). But if i do this via
> the UI, it works. Is this a bug?
>
>
>>
>> In Developer studio, It is a validation because no point of having
>> mediator after respond. But we do not have such a validation in proxy
>> service UI.
>>
> But even thou it shows as warning, it removes some of the code (actually
> the respond mediator tag and also some logic inside the aggregate mediator
> is also lost) :(
>
>>
>> Thanks,
>> Nuwanw
>>
>> On Sat, Nov 5, 2016 at 3:34 PM, Niranjan Karunanandham <[email protected]
>> > wrote:
>>
>>> Hi ESB,
>>>
>>> My requirement is to aggregate the data in the Out sequence and send it
>>> to a backend. The payload received from the backend needs to be send back
>>> to the client. I am able to do this using a proxy service in the UI. But
>>> when I try to do this using Developer Studio 3.8.0, I get the following
>>> error:
>>> *"Warning! Reason: Not allow to add mediators after a Respond Mediator"*
>>>
>>> Any why this is allowed via the UI, but not by Developer Studio?
>>>
>>> Regards,
>>> Nira
>>> --
>>>
>>>
>>> *Niranjan Karunanandham*
>>> Associate Technical Lead - WSO2 Inc.
>>> WSO2 Inc.: http://www.wso2.com
>>>
>>>
>>
>>
>> --
>> Nuwan Wimalasekara
>> Associate Technical Lead
>> WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> phone: +94 71 668 4620
>>
>>
>>
>>
> Regards,
> Nira
>
> --
>
>
> *Niranjan Karunanandham*
> Associate Technical Lead - WSO2 Inc.
> WSO2 Inc.: http://www.wso2.com
>
>
--
Nuwan Wimalasekara
Associate Technical Lead
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
phone: +94 71 668 4620
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev