jtheuer
16 years agoOccasional Contributor
groovy script, property transfer, Unexpected element: CDATA.
Hi, for some hours now, I try to transfer a JSON property from one Response as JSON property for a following test. Sadly, it doesn't work with the PropertyTransfer method: I followed the steps from http://www.soapui.org/userguide/functio ... sfers.html but when I click "define namespaces" I get "Property source is not a request" which looks like http://www.soapui.org/xref/com/eviware/ ... .html#1185 .
Now I try the groovy script to transfer the property. first, here is the response as xml:
I want to transfer the url field. I copyied again some groovy code from the documentation:
But the code already stucks at "def holder": XmlBeansException: Unexpected element: CDATA.
Can someone help me? what is this CDATA issue about? There is no CDATA field in the Response, as far as I can see...
Thanks,
Jan
Now I try the groovy script to transfer the property. first, here is the response as xml:
<Response xmlns="http://localhost/service/_tempfile/">
<error/>
<httpStatus>200</httpStatus>
<url>17d091f8da3f8f464147f8f9103e589f</url>
</Response>
I want to transfer the url field. I copyied again some groovy code from the documentation:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context );
// create holder for last response and log requestId
def holder = groovyUtils.getXmlHolder( "upload simple tour#Response" )
log.info( holder.getNodeValue( "//ns1:httpStatus" ))
But the code already stucks at "def holder": XmlBeansException: Unexpected element: CDATA.
Can someone help me? what is this CDATA issue about? There is no CDATA field in the Response, as far as I can see...
Thanks,
Jan