Forum Discussion
Sphujidhwaj
Contributor
def alert = com.eviware.soapui.support.UISupport; def inputFile = new File("C:\\Test.xml") if(!inputFile.exists()) { alert.showInfoMessage("Input File 'Test.xml' not found!"); } else { def InputXML = new XmlParser().parseText(inputFile.text) def InputRow = InputXML.ReportResult.findAll{it.'Group Name'.text().size() } InputRow.each{log.info(it.'Group Name'.text()); } }
I have tried the above code but I get result as - Script-result: []
Let me know where I am going wrong.
Note: The Test.xml contains the Soap Response with data enclosed in CDATA
Thanks,
SD
Sphujidhwaj
9 years agoContributor
How do I extract the JSON part from CDATA?? Please help.
- nmrao9 years agoChampion Level 3Have you looked at the links provide earlier in Message #5?
- Sphujidhwaj9 years agoContributor
Yes , I tried but not able to get the data. I am encountering a message Content is not allowed in prolog.
How to convert the Part of response in Soap to Json ?
- nmrao9 years agoChampion Level 3I believe, you did mention this earlier too if I remember.
May be there must be some issue with the xml that you receive. You can search on the net for that error. - Sphujidhwaj9 years agoContributor
There is no issue with the XML here this service is being called by the component and processed without any error.
Related Content
Recent Discussions
- 3 days agoKLWallace