Forum Discussion

MOTOROLA_Suppor_1's avatar
14 years ago

Which event handler to get Soap Respnse content?

Per Prop Support, I used afterRequest event to log soap request. Which event should I use for logging soap response ?

thanks a lot
sheena

3 Replies

  • I tried to use TestRunListener.afterStep to get Soap response. seems work but I need only trigger this script when testStep is 'request'. I don't know how to filter other type testStep as I have trouble to access testStep object inside the callback from this event. Still need help.

    thanks
    sheena


    ==== problem script for sfterStep event====

    import com.eviware.soapui.support.xml.XmlUtils

    //log.info(testStep.config.type) can't access testStep here.

    if( testStepResult.response == null )
    return

    def rsp_str = testStepResult.response.responseContent
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    you should be able to access the teststep with

    log.info testStepResult.testStep.config.type

    Does that help?

    regards,

    /Ole
    eviware.com