Forum Discussion

Apoorva6's avatar
Apoorva6
Frequent Contributor
8 years ago

How to access soapUI request xml from mockResponse script

I need to access my request in mock service script which has log, context, requestContext, mockRequest and mockResponse variables that can be used. Please let me know how can i access the request.

Note: I cannot create separate test suite or test case for this and hence i need to access request xml in mock service script only.

  • Apoorva6's avatar
    Apoorva6
    Frequent Contributor

    Hi,

     

    Any update on above Q please ?

    I am using this, log.info context.expand('${#Request1}') , its printing null. Any idea ?

    • nmrao's avatar
      nmrao
      Champion Level 3
      What does it show for the following statement in the Script Despatcher?

      log.info mockRequest
      • Apoorva6's avatar
        Apoorva6
        Frequent Contributor

        Hi Rao, with that I have below response:

         

        Fri Mar 24 20:47:14 IST 2017:INFO:com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest@57aeff