Forum Discussion

pkunst's avatar
pkunst
Contributor
12 years ago

Get Response from other TestCase

Hi,
I am trying to transfer the element of a response from another TestCase.
So I tried to read the response via script.
This is my Code:

def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def holder = groovyUtils.getXmlHolder("TestCase08#TestStep05#Response")

Also i tried to add the name of the TestCase and the project separated by "#", but this also fails
The error message which occurs is the following:
org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA


Is it possible to it this way or have transfer the response to a property and then read it from the testCase08 properties? Save the property as xml file and read the wanted node from tis generated xml file?

Tank you for your help

3 Replies

  • PaulDonny's avatar
    PaulDonny
    Regular Contributor
    Hi PKunst,

    It looks like your issue is a CDATA issue which isn't handled as well within the Holder. Are you just trying to parse out some values? If so, regexp and treating it all as a string might be a better option.
  • Thank you fpor your response. I found a work around.
    At the moment I am calling another method of the service which loads the needed nodes again.
    What is regepx?