How to access soapUI request xml from mockResponse script
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2017
08:26 AM
03-21-2017
08:26 AM
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.
4 REPLIES 4
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2017
10:40 PM
03-23-2017
10:40 PM
Hi,
Any update on above Q please ?
I am using this, log.info context.expand('${#Request1}') , its printing null. Any idea ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017
07:04 AM
03-24-2017
07:04 AM
What does it show for the following statement in the Script Despatcher?
log.info mockRequest
Regards,
Rao.
log.info mockRequest
Regards,
Rao.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2017
10:53 AM
03-24-2017
10:53 AM
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2017
09:37 AM
03-25-2017
09:37 AM
Hi,
I am able to get the request with below in dispatch script
def requestBody = mockRequest.getRequestContent()
log.info "Request body: " + requestBody
Thank you
