Forum Discussion

gutterball's avatar
gutterball
Occasional Contributor
11 years ago

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 ?


                 
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