问题
I used wso2 foreach mediator. When my request is Json then I added "//data" as expression.
foreach expression="//data"
my json request is like this
{
"data":[
{
"id":1,
"name":"abc",
},
{
"id":2,
"name":"efg",
}
]
}
This scenario worked as fine. Now I need to send like this "pri,23,aaaa;nuwa,45,qqqq" text value as request.Question is,
how I set expression in foreach tag when request is text valu
回答1:
ForEach mediator only support XML and JSON content types. Your message is a CSV, and hence I suggest you convert it to XML and then use ForEach mediator.
来源:https://stackoverflow.com/questions/44718783/how-to-add-expression-on-wso2-esb-foreach-mediator-when-request-is-text