How to add expression on wso2 esb foreach mediator when request is text

元气小坏坏 提交于 2019-12-02 15:14:23

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!