Forum Discussion
hepp
15 years agoOccasional Contributor
Robert,
In fact my seconf query contains as well repetition (bumber of array is variable) of the equipments. like below :
There for I need to loop to collect all equimpent code and associated proce from the database and for each database row I need to add new equipment node to my query.
Currently I did the following
1) datasource to accres database.
2) property transfert wit 2 properties defined.
code : source = databasesource [step 1]; property eqpt_code.
Target = the query [set4]; property = Request and
price : source = databasesource [step 1]; property eqpt_price.
Target = the query [set4]; property = Request and
3) loop to 1
4) send the request
When a run the test case, the system loops over the 14 elements found into the database, but only the last equipment code et price are present within the request sent at step4 (see below) whereas I expected 14 node into the equipment list.
Hoping that clarifies.
In fact my seconf query contains as well repetition (bumber of array is variable) of the equipments. like below :
<web:EquipmentList>
<web:Equipment>
<web:Code>164059</web:Code>
<web:NewPrice>0</web:NewPrice>
</web:Equipment>
<web:Equipment>
<web:Code>1688</web:Code>
<web:NewPrice>600</web:NewPrice>
</web:Equipment>
<web:Equipment>
<web:Code>164074</web:Code>
<web:NewPrice>0</web:NewPrice>
</web:Equipment>
</web:EquipmentList>
There for I need to loop to collect all equimpent code and associated proce from the database and for each database row I need to add new equipment node to my query.
Currently I did the following
1) datasource to accres database.
2) property transfert wit 2 properties defined.
code : source = databasesource [step 1]; property eqpt_code.
Target = the query [set4]; property = Request and
declare namespace web='http://www.xxxxx/webservices/';
//web:GetValuation/web:Valuation/web:EquipmentList/web:Equipment/web:Code
price : source = databasesource [step 1]; property eqpt_price.
Target = the query [set4]; property = Request and
declare namespace web='http://www.xxxxxx.com/webservices/';
//web:GetValuation/web:Valuation/web:EquipmentList/web:Equipment/web:NewPrice
3) loop to 1
4) send the request
When a run the test case, the system loops over the 14 elements found into the database, but only the last equipment code et price are present within the request sent at step4 (see below) whereas I expected 14 node into the equipment list.
Hoping that clarifies.
<web:Mileage>30000</web:Mileage>
<web:CalculationMode>STANDARD</web:CalculationMode>
<web:EquipmentList>
<web:Equipment>
<web:Code>165804</web:Code>
<web:NewPrice>880</web:NewPrice>
</web:Equipment>
</web:EquipmentList>