How about trying the script mediator? Script mediator[1] can be used to
generate these types of payloads.

[1] - https://docs.wso2.com/display/ESB490/Script+Mediator

On Wed, Jan 13, 2016 at 10:29 AM, John Q <johnq3...@gmail.com> wrote:

> Hello,
>
> This is what I need, I have a sequence that receive the following message:
>
> <a>
>   <b>
>       ...
>   </b>
>   <b>
>       ...
>   </b>
>   <b>
>       ...
>   </b>
> </a>
>
> I need to create a payload and invoke a service for each <b> element, but
> I need to call the service for each element once the previous invocation
> has finished, that's why I cannot use the iterate mediator and I need to
> create a custom one, so, what I need is to receive the original message
> into the custom one, split the message and then invoke each service, or
> maybe inject the corresponding messages into the synapse...
>
> I cannot use the iterate mediator with sequential = true because as far as
> I know and have tested before, the sequential = true only prevents the
> invocations to start sequentially but after that, all of them run in
> parallel, I cannot use the foreach mediator because as far as I know, I
> cannot use payload, or call mediators inside foreach, in facts, I have
> tried and it seems like the original message get corrupted and the
> execution of the sequence shows an unexpected behavior.
>
> thanks,
> john
>
> _______________________________________________
> Architecture mailing list
> architect...@wso2.org
> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>
>


-- 
Dulitha Wijewantha (Chan)
Software Engineer - Mobile Development
WSO2 Inc
Lean.Enterprise.Middleware
 * ~Email       duli...@wso2.com <duli...@wso2mobile.com>*
*  ~Mobile     +94712112165*
*  ~Website   dulitha.me <http://dulitha.me>*
*  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
  *~Github     @dulichan <https://github.com/dulichan>*
  *~SO     @chan <http://stackoverflow.com/users/813471/chan>*
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to