2016-05-31 8 views
0

dss의 호출 응답을 반복하는 데 문제가 있습니다. 나는 2 개 서버WSO2 ESB DSS 응답 반복 (json 배열)

데이터 서비스 (4.3.4) 기능은

설치와

WSO2 ESB 서버 (4.9.0) WSO2 응용 프로그램 서버 (5.3.0) 내가 할 페이로드

<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> 

응답은 다음과 같습니다

369,735,응답을 읽으려면, 내가

<property name="messageType" scope="axis2" type="STRING" value="application/json"/> 

를 JSON과 JSON-평가와 가치를 얻을 수 messageType입니다 드 변경합니다.

<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> 
     ... 

도 사용해 보았습니다. 성공 (messagetype 변경없이) :

<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]

답변

0

아래 적절한 당신의 반복자 중재자의 네임 스페이스, 샘플 시도

 <iterate xmlns:ns1="ReportsDataService" id="MyIterator" expression="//ns1:ReportRowSet/ns1:reportRow" sequential="true"> 
     <target> 
      <sequence> 
       <log level="custom"> 
       <property name="col" expression="//ns1:column1"/> 
       </log> 
       <call> 
       <endpoint> 
        <http uri-template="http://endpoint.url"/> 
       </endpoint> 
       </call> 
      </sequence> 
     </target> 
    </iterate> 
+0

우수 !! 그 작품 perfec !!!!! 감사!!! – cmarguello