Forum Discussion
14 Replies
Sort By
- M_McDonaldSuper ContributorActually I just noticed that the CDATA wrappers are being stripped out from the Raw response.
Raw:HTTP/1.1 200 OK
Content-Type: text/xml; charset=iso-8859-1
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
<resultset>
<row rowid='1'>
<column name='storenum'><![CDATA[STORE1]]></column>
<column name='dob'><![CDATA[01/01/1950]]></column>
<column name='pmisc1'><![CDATA[]]></column>
XML tab (and responseAsXml):<resultset>
<row rowid="1">
<column name="storenum">STORE1</column>
<column name="dob">01/01/1950</column>
<column name="pmisc1"/>
Is there any way to retain the CDATA wrappers? - SmartBear_SuppoSmartBear Alumni (Retired)Hi!
hm... what if you turn off pretty-printing for the request.. does that help?
regards,
/Ole
eviware.com - M_McDonaldSuper ContributorYes, now I am getting the CDATA elements. However, my xpath assertions are now failing with
[tt:3n3klg70]XmlException:error: Unexpected element: OPEN_TAG[/tt:3n3klg70]
It was my understanding that xpath would ignore the CDATA wrapper. For example, in XMLSpy this xml:<resultset>
<row rowid='1'>
<column name='storenum'><![CDATA[STORE1]]></column>
</row>
</resultset>
with the following xpath expression:
/resultset/row/column/text()
returns STORE1. But with the same expression in soapUI I get the exception. - SmartBear_SuppoSmartBear Alumni (Retired)Hi!
hmm.. can you show the entire exception?
regards,
/Ole
eviware.com - M_McDonaldSuper ContributorHere you go:
[tt:4fge42ph]Sat Dec 05 11:16:12 EST 2009:ERROR:org.apache.xmlbeans.XmlException: error: Unexpected element: OPEN_TAG
org.apache.xmlbeans.XmlException: error: Unexpected element: OPEN_TAG
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.model.propertyexpansion.resolvers.ResolverUtils.extractXPathPropertyValue(ResolverUtils.java:92)
at com.eviware.soapui.model.propertyexpansion.resolvers.ModelItemPropertyResolver.resolveProperty(ModelItemPropertyResolver.java:90)
at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expand(PropertyExpander.java:159)
at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expandProperties(PropertyExpander.java:92)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.SimpleContainsAssertion.assertContent(SimpleContainsAssertion.java:82)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.SimpleContainsAssertion.internalAssertResponse(SimpleContainsAssertion.java:75)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:156)
at com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequest.assertResponse(HttpTestRequest.java:134)
at com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequest.setResponse(HttpTestRequest.java:119)
at com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep.run(HttpTestRequestStep.java:275)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:193)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:124)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:137)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException: Unexpected element: OPEN_TAG
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)
... 25 more[/tt:4fge42ph] - SmartBear_SuppoSmartBear Alumni (Retired)Hi!
hmm.. .can you show the raw response message? Either screenshot of raw message tab or http log output should be enough..
thanks in advance!
/Ole
eviware.com - M_McDonaldSuper Contributor
- SmartBear_SuppoSmartBear Alumni (Retired)ok thanks!
Also I'm going to need the exact content of the contains-assertions.. can you show or mail it?
sorry for all this..
/Ole
eviware.com - M_McDonaldSuper ContributorHere is one of the XPath assertions:
if (//resultset[1]/row[1]/column[@name="trk_group"]/text())
then //resultset[1]/row[1]/column[@name="trk_group"]/text()
else '' - SmartBear_SuppoSmartBear Alumni (Retired)Hi!
ok.. but the error seems to occur in a SimpleContains assertion.. do you have any of those in the teststep? What is its configuration ?
regards!
/ole
eviware.com
Related Content
- 6 years agoyognsal