How to retrieve multiple rows from database using WSO2 ESB?

南笙酒味 提交于 2019-12-19 11:49:23

问题



I want to retrieve multiple rows in a db using wso2 esb. Using dblookup mediator I am able to retreive only one row. It is suggested to use WSO2 DSS can you please help me with using DSS to retrieve multiple rows in ESB completely.

Thanks


回答1:


If you don't want to use DSS (which is our case), then you might try the custom mediator that can be found here.

https://github.com/mephist/wso2-esb-dbselect




回答2:


Data Service server is used to expose your data(base) ,with sql ,as an available xml/restful web services . You could then call the data service through its endpoint from your ESB proxy service, receiving your result set(any # rows), so it is suited to your requirement.

Perhaps you should try to experiment with it first and post any issues you arrive at.




回答3:


I got it working without DSS.
just write a script mediator to call dblookup or dbreport mediator as many times as how many rows required.

var a=mc.getSequence('gett');
        a.getList().get(0).mediate(mc);
        a.getList().get(1).mediate(mc);
        a.getList().get(2).mediate(mc);


here 'gett' is my sequence and it has 3 child so i'm call all three.



来源:https://stackoverflow.com/questions/31138913/how-to-retrieve-multiple-rows-from-database-using-wso2-esb

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