Created
May 13, 2020 15:49
-
-
Save yasassri/0193fcc37f2b1e6edf2f1c6d58f10afb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<proxy xmlns="http://ws.apache.org/ns/synapse" | |
name="IterateSample" | |
startOnLoad="true" | |
statistics="disable" | |
trace="disable" | |
transports="http,https"> | |
<target> | |
<inSequence> | |
<log level="custom"> | |
<property expression="$body//stocks/stock" name="The Stocks"/> | |
</log> | |
<iterate expression="$body//stocks/stock" id="stocks"> | |
<target> | |
<sequence> | |
<log> | |
<property name="Iterating" value="====="/> | |
</log> | |
<call> | |
<endpoint> | |
<http uri-template="http://www.mocky.io/v2/5ebc10972e0000bf269f416e"/> | |
</endpoint> | |
</call> | |
</sequence> | |
</target> | |
</iterate> | |
<aggregate id="stocks"> | |
<completeCondition> | |
<messageCount max="-1" min="-1"/> | |
</completeCondition> | |
<onComplete expression="$body/*[1]"> | |
<payloadFactory media-type="xml"> | |
<format> | |
<Status>Completed</Status> | |
</format> | |
<args/> | |
</payloadFactory> | |
<respond/> | |
</onComplete> | |
</aggregate> | |
</inSequence> | |
</target> | |
<description/> | |
</proxy> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment