I'm integrating wso2dss 3.5 and wso2esb 4.9. In DSS, I created a DataService to get data from a database. Following the WSO2 Dashboard into DSS, I used the endpoint in my eclipse project (Developer Studio). The xml gerated by DSS is:
<elements xmlns="http://ws.wso2.org/dataservice">
<row>
<name>nome1</name>
<address>rua xalala das xalalas</address>
</row>
<row>
<name>nome2</name>
<address>ruas rms did sa</address>
</row>
<row>
<name>nome3</name>
<address>aldoas daso dasodsa</address>
</row>
</elements>
So, in my ESB config project, there is this generated code:
<foreach expression="//ds:elements/ds:row" xmlns:ds="http://ws.wso2.org/dataservice">
<sequence>
<payloadFactory media-type="xml">
<format>
<p:Insert xmlns:p="http://ws.wso2.org/dataservice">
<xs:nome xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:nome>
<xs:endereco xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:endereco>
</p:Insert>
</format>
<args>
<arg evaluator="xml" expression="/ds:row/name"/>
<arg evaluator="xml" expression="/ds:row/address"/>
</args>
</payloadFactory>
<log>
<property expression="/ds:row/name" name="nome"/>
<property expression="/ds:row/address" name="endereco"/>
</log>
</sequence>
</foreach>
I'm trying to get the value of first and second element at each row (name and address). How can I do this?