Forum Discussion
It is working when i run the script directly in soapUI. I checked the soapui.log file as well but was unable to see any errors come up there.
I have added apache poi to soapui's ext folder and have imported POI classes for use in my script as well; here's the groovy code snippet to open and read the file.
prj = testRunner.testCase.testSuite.project.workspace.getProjectByName("<project>");
dataPath = prj.getPropertyValue("<dataPath>");
FileInputStream xl = new FileInputStream(new File("<datatPath>"));
Workbook workbook = new XSSFWorkbook(xl);
Sheet dataSheet = workbook.getSheetAt(0);
Row row = dataSheet.getRow(0);
Cell data1Cell = row.getCell(0);
data1 = data1Cell.getStringCellValue().trim();
When i run the code listed in my previous thread in java, i see the following exception :
org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
I understand that this comes up when it tries to run/parse the response which in turn tells me that the request is not getting updated correctly based on the file data.
The file contains the data which needs to be updated into project properties. Once these properties get updated, the script uses the runner to run the request.
thanks.
Related Content
- 10 months ago
- 3 years ago
- 9 years ago
- 8 years ago
Recent Discussions
- 9 minutes ago
- 15 years ago