chihhsiw
14 years agoOccasional Contributor
How do I get endpoint from a XML file?
Hello,
I want to get endpoint from an input file and I have input file data_source_file.txt
<ThreadCount>1</ThreadCount>
<endpoint>http://foo.bar</endpoint>
then in soapUI testcase I have
setup script
File readFile = new File(readfilePath+ "data_source_file.txt")
Filecontent = readFile.getText()
gutils = new com.eviware.soapui.support.GroovyUtils( context )
InputXML = gutils.getXmlHolder(Filecontent)
when I run the testcase, I got the error below from getXmlHolder()
TestCase failed [org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA:org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA], time taken = 0
If I remove <endpoint>http://foo.bar</endpoint>, then it is fine,
can anyone give me idea on how to fix this issue?
thanks
chihhsiw
I want to get endpoint from an input file and I have input file data_source_file.txt
<ThreadCount>1</ThreadCount>
<endpoint>http://foo.bar</endpoint>
then in soapUI testcase I have
setup script
File readFile = new File(readfilePath+ "data_source_file.txt")
Filecontent = readFile.getText()
gutils = new com.eviware.soapui.support.GroovyUtils( context )
InputXML = gutils.getXmlHolder(Filecontent)
when I run the testcase, I got the error below from getXmlHolder()
TestCase failed [org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA:org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA], time taken = 0
If I remove <endpoint>http://foo.bar</endpoint>, then it is fine,
can anyone give me idea on how to fix this issue?
thanks
chihhsiw