scorpionawal
15 years agoOccasional Contributor
If the source is missing, the transferred property is null,
Hi Guys,
If the source is missing, the property transfers value=null but I need 0 to be transferred in this case.
The xml response is:
and I am trying to transfer
//Results[1]/ResultSet[1]/Row[FROM="66850117700" and TO="66860111111"]/number(SUM)
into a property
Please note that this source does not exist in the response. So Property being transferred is null.
And if I untick the option, I get an error "Missing source for blah blah".
Can I transfer a number, like 0, in this case. I have tried it with number(above expression) but then I get NaN.
Any help will be appreciated.
Regards
Amit
If the source is missing, the property transfers value=null but I need 0 to be transferred in this case.
The xml response is:
<Results>
<ResultSet fetchSize="10">
<Row rowNumber="1">
<FROM>66850117700</FROM>
<TO>66860111113</TO>
<SUM>20</SUM>
<COUNT>2</COUNT>
</Row>
<Row rowNumber="2">
<FROM>66950117777</FROM>
<TO>66860111114</TO>
<SUM>30</SUM>
<COUNT>3</COUNT>
</Row>
<Row rowNumber="3">
<FROM>66950117777</FROM>
<TO>66860111113</TO>
<SUM>40</SUM>
<COUNT>4</COUNT>
</Row>
<Row rowNumber="4">
<FROM>66850117700</FROM>
<TO>66860111114</TO>
<SUM>20</SUM>
<COUNT>2</COUNT>
</Row>
</ResultSet>
</Results>
and I am trying to transfer
//Results[1]/ResultSet[1]/Row[FROM="66850117700" and TO="66860111111"]/number(SUM)
into a property
Please note that this source does not exist in the response. So Property being transferred is null.
And if I untick the option, I get an error "Missing source for blah blah".
Can I transfer a number, like 0, in this case. I have tried it with number(above expression) but then I get NaN.
Any help will be appreciated.
Regards
Amit
. Long answer is depends what you are looking for. Try going through the soapui features section for more information. Also, you can get some help on groovy.codehaus.org. If you have any specific question related to groovy scripting, you can try searching in this forum itself or you can reach out to me. If possible, I might be able to help you. Send me a Private Message with your location and other details, we might get in touch.