chanukya1
10 years agoNew Contributor
Jenkins throws org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA but not soapUI
Hi
I am running automated tests using SOAPUI. My tests run safe when running in SOAPUI but one test fails when running in Jenkins as maven project.
10:54:36,633 ERROR [SoapUI] An error occurred [error: Unexpected element: CDATA], see error log for details org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486) at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696) at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208) at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:580) at com.eviware.soapui.support.xml.XmlUtils.createXmlObject(XmlUtils.java:263) at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.extractXPathPropertyValue(ResolverUtils.java:97) at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.parseProperty(ResolverUtils.java:67) at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.checkForExplicitReference(ResolverUtils.java:44) at com.eviware.soapui.model.propertyexpansion.resolvers.ModelItemPropertyResolver.getScopedProperty(ModelItemPropertyResolver.java:218) at com.eviware.soapui.model.propertyexpansion.resolvers.ModelItemPropertyResolver.resolveProperty(ModelItemPropertyResolver.java:51) at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expand(PropertyExpander.java:184) at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expandProperties(PropertyExpander.java:112) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.expand(WsdlTestRunContext.java:157) at com.eviware.soapui.model.testsuite.TestRunContext$expand.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) at Script1.run(Script1.groovy:34) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:100) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:122) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:139) at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:165) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:156) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:141) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:927) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239) at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152) at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47) at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724) Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 1; columnNumber: 53; Unexpected element: CDATA at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038) at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723) at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
I am trying to load a stored variable from project custom properties.
`context.expand( '${#TestCase#ControllerIds#$[1]}' )`
Could some one tell me a fix for this.
Hi,
If you're you need to pass on a response attribute onto a subsequent response - cant you just use the property transfer and datasink out of the box functionality to do this?
i.e. use the property transfer function to pass the attribute value to the subsequent request and property transfer to the datasink (file) type?
Perhaps I am misunderstanding something?
Cheers,
richie