Forum Discussion
Hi All,
I have web service request in which particular part (<Property>) will be repeated maximum of 1000 times. We have scenarios for single property as well as bulk property values. I have prepared datasheet in excel for single property in ReadyApi. There are totally 15 fields in the request xml and we pass only 'ExternalReference' with UUID and Fastingnickel on selection basis and <Property> tag with necessary details. When we pass values in <Property> tag then 'ExternalReference' is not needed and vice versa. I am facing difficulties in preparing the same for bulk property (reqeust is as below). Kindly help me with groovy code for the same as I am working with Groovy and ReadyApi for the first time.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="lf.se/SakDSL/Common/Property/WSDL/GetFormOfHousing/v1.0" xmlns:v11="lf.se/SakDSL/Common/Property/BO/GetFormOfHousing/v1.0" xmlns:v4="lf.se/SakDSL/CallerContext/v4.1">
<soapenv:Header/>
<soapenv:Body>
<v1:RequestBody>
<v11:InputParameters>
<v11:PropertyList>
<!--1 or more repetitions:-->
<v11:Property>
<!--Optional:-->
<v11:ExternalReference/>
<!--Optional:-->
<v11:PostalAddress>
<!--Optional:-->
<v11:Street>Staveläng 8</v11:Street>
<!--Optional:-->
<v11:Street2/>
<v11:PostalCode>71693</v11:PostalCode>
<v11:City>Fjugesta</v11:City>
</v11:PostalAddress>
<!--Optional:-->
<v11:RecordReference>0</v11:RecordReference>
</v11:Property>
<v11:Property>
<!--Optional:-->
<v11:ExternalReference/>
<!--Optional:-->
<v11:PostalAddress>
<!--Optional:-->
<v11:Street>Fåruddsvägen 16</v11:Street>
<!--Optional:-->
<v11:Street2/>
<v11:PostalCode>13466</v11:PostalCode>
<v11:City>Ingarö</v11:City>
</v11:PostalAddress>
<!--Optional:-->
<v11:RecordReference>1</v11:RecordReference>
</v11:Property>
<v11:Property>
<!--Optional:-->
<v11:ExternalReference/>
<!--Optional:-->
<v11:PostalAddress>
<!--Optional:-->
<v11:Street>Sjögärde 2</v11:Street>
<!--Optional:-->
<v11:Street2/>
<v11:PostalCode>51995</v11:PostalCode>
<v11:City>Tostared</v11:City>
</v11:PostalAddress>
<!--Optional:-->
<v11:RecordReference>2</v11:RecordReference>
</v11:Property>
</v11:PropertyList>
<!--Optional:-->
<v11:LogReference>1</v11:LogReference>
</v11:InputParameters>
<v4:RequestContext>
<!--1 to 2 repetitions:-->
<v4:SecurityTokenList>|LfTicket|r5DW0mfM//LkuhdQTP/Sr/iSK+oex6vn/2o4O7t3eOusGxv/hfvCf2FhBOBIjpYu9qH4SJEj1MdhqgvGQhbPpzf7i6NZGYzb6kuzAwvCljhLn+d0Coay1fwOrT3rml46S7hdxZV/N/KFAqnhKqiZA/IzKinriJ0NS8Lpd+Q1kronG10YVP6LUh7BE2tQVDARJuSJSVJKStx2FP2JGvh0bkWorV4ZCxuarpAiVyT15Y6Q+YgQWRL/tfZs1QnOb3U6Ar8u9POgLz0Iic+M5oJOYdatddWYDsjy75tv/J8tQG2exNgl7t9NWH58Oy2tCUQQB5LmSo+tvvPQPd9G/4hcJb4EApUgBM2UB6eeaE2R+78=</v4:SecurityTokenList>
<v4:OriginalCaller>DSL</v4:OriginalCaller>
<v4:SysCode>DS</v4:SysCode>
<v4:TransID>12345</v4:TransID>
<v4:Timestamp>2018-05-08T00:00:00.000+02:00</v4:Timestamp>
<!--1 to 2 repetitions:-->
<v4:MachineIPList>
<v4:MachineIP>1.1.1.1</v4:MachineIP>
<v4:MachineContext>CallingMachine</v4:MachineContext>
</v4:MachineIPList>
<!--Optional:-->
<v4:Environment>DEV</v4:Environment>
</v4:RequestContext>
</v1:RequestBody>
</soapenv:Body>
</soapenv:Envelope>
Related Content
- 5 years agoVitamin
- 11 years agotomerw
- 3 years agonisgupta
- 9 years agoOesmerilhador
Recent Discussions
- 4 days agoemoya