0
我有一个迭代dss的调用响应的问题。我有2个服务器WSO2 ESB迭代DSS响应(json数组)
WSO2 ESB服务器(4.9.0) WSO2应用服务器(5.3.0)与数据服务(4.3.4)功能安装
我做一个有效载荷
<payloadFactory media-type="xml">
<format>
<p:valoresReport xmlns:p="ReportsDataService">
<xs:uuid xmlns:xs="ReportsDataService">$1</xs:uuid>
</p:valoresReport>
</format>
<args>
<arg value="123456789"/>
</args>
</payloadFactory>
并通过终点做一个呼叫
<call blocking="true">
<endpoint key="ReportsDataServiceEndPoint"/>
</call>
的回应是:
<ReportRowSet xmlns="ReportsDataService">
<reportRow>
<column1>1</column1>
<column2>2</column2>
<column3>3</column3>
</reportRow>
<reportRow>
<column1>columna 1</column1>
<column2>olumna 2</column2>
<column3>columna 3</column3>
</reportRow>
</ReportRowSet>
要读取响应,我改变德为messageType到JSON
<property name="messageType" scope="axis2" type="STRING" value="application/json"/>
,并得到使用JSON-EVAL值。
<property expression="json-eval($.ReportRowSet.reportRow)" name="rows"
scope="default" type="STRING"/>
我可以登录属性
<log level="custom">
<property expression="$ctx:rows" name="ROWS"/>
</log>
输出:
[2016-05-31 16:21:38,489] INFO - LogMediator ROWS = [{"column1":1,"column3":3,"column2":2},{"column1":"columna 1","column3":"columna 3","column2":"olumna 2"}]
但是当我尝试迭代行,我不知道如何做到这一点(这种方式不工作)
<iterate continueParent="true" expression="$ctx:rows"
id="MyIterator" sequential="true">
<target>
<sequence>
...
我也试过没有成功(没有改变消息类型):
<iterate continueParent="true" expression="//ReportRowSet/reportRow"
id="MyIterator" sequential="true">
什么是做这种整合和迭代的正确形式。
我让你我的DSS和顺序:
ReportsDataService.dbs:[https://drive.google.com/open?id=0B44t8SdKZz79ellKVmpkM0t6Rmc]
GenerarReporteSequence.xml:https://drive.google.com/open?id=0B44t8SdKZz79YlkxMnNnNm8weGs]
优秀!!!!那工作完美!!!!!谢谢!!! – cmarguello