gutterball
11 years agoOccasional Contributor
How to get the request and response from WsdlTestStepResult
Hi
I have the following code fragment. I would like to get the request and response XML. I can see the request and response XML via the eclipse debugger. But how can I get at these values from java ?
In eclipse debug mode, I am able to navigate from resultStep->testStep->testRequest to get rquestContent and response.responseContent.
What are the method I should call to get these ?
Thanks
I have the following code fragment. I would like to get the request and response XML. I can see the request and response XML via the eclipse debugger. But how can I get at these values from java ?
WsdlProject project = new WsdlProject("c:\\soapUiTest\\....);
WsdlTestSuite wsdlTestSuite = project.getTestSuiteByName("CalculatePrice TestSuite")
WsdlTestCase wsdlTestCase = wsdlTestSuite.getTestCaseByName("calculatePrice TestCase");
WsdlTestStep wsdlTestStep = wsdlTestCase.getTestStepByName("calculatePrice");
WsdlTestCaseRunner runner = new WsdlTestCaseRunner(wsdlTestCase, new PropertiesMap());
WsdlTestStepResult result = (WsdlTestStepResult) wsdlTestStep.run(runner, new WsdlTestRunContext(wsdlTestStep) );
WsdlTestStep resultStep = (WsdlTestStep) result.getTestStep();
In eclipse debug mode, I am able to navigate from resultStep->testStep->testRequest to get rquestContent and response.responseContent.
What are the method I should call to get these ?
Thanks