HEATConsultant
7 years agoOccasional Contributor
How to load a file as Base64 in a loop using source data property as filename
I have a data load that uses XLS as a source and SOAP as a destination.
The test steps are:
- Data Source
- Create Record - Post SOAP Request
- Add Attachment - Post SOAP Request
Note: 2 post requests are needed as there are two different post requests for the related record and attachment. - Datasource Loop
The above works fine and the records are created and attachment added where the attachment is a property (column) in the XLS file and contains base64 data.
What I would like to be able to do instead is load a file at run time by using a column in the xls file to specify the file name to load and convert.
for example the source column would contain the value C:\Temp\MyPic.jpg and when posting the soap request SoapUI would load the file C:\Temp\MyPic.jpg, convert it, and pass it as Base64 data in the Soap Properties.