Forum Discussion

wichitk's avatar
wichitk
Occasional Contributor
6 years ago
Solved

Need help! with empty response when I using the external XML as response.

Hi,

 

I'm the beginner for SoapUI.

I have a problem when using the external XML file for dynamic responses. It returns an empty message for the response but it appears on the log.info.

1. I created the request "Req_NAME_ID1"

2. I created the response and force it reads the XML from specifying the path.

def resultRespXML = new File("C:\\Users\\Administrator\\Desktop\\Temp\\Test\\mockResponses\\Resp_0000202130123310_0057076200.xml")
log.info resultRespXML

context.content = resultRespXML

3. Run and see the log. It shows the message log from log.info

4. But it doesn't show the data at the Response.

 

Please help me.

 

Regards,

Dan

  • Seems you could do some creative workaround, such as:

     

    test.bat

    echo ENV123 > C:\env_name.txt
    testrunner "myproject.xml"

    Project Load Script:

    project.setPropertyValue( "ENV_NAME", new file("C:/env_name.txt").text )
    assert project.getPropertyValue("ENV_NAME") = "ENV123"

     

    I could have some typo since I haven't run this, but just to give you an idea...