for( TestCase testCase : testSuite.getTestCaseList() )
{
int testStepCount = testCase.getTestStepCount();
for( int c = 0; c < testStepCount; c++ )
{
WsdlTestStep testStep = ( WsdlTestStep )testCase.getTestStepAt( c );
if( testStep instanceof WsdlTestRequestStep )
{
WsdlTestRequest testRequest = ( ( WsdlTestRequestStep )testStep ).getTestRequest();
if( testRequest != null && testRequest.getOperation() != null
&& testRequest.getOperation().getInterface() == iface )
{
String newRequest = testRequest.getOperation().createRequest( buildOptional );
if( keepHeaders )
{
newRequest = SoapUtils.transferSoapHeaders( testRequest.getRequestContent(), newRequest,
iface.getSoapVersion() );
}
if( keepExisting )
newRequest = XmlUtils.transferValues( testRequest.getRequestContent(), newRequest );
// changed?
if( !newRequest.equals( testRequest.getRequestContent() ) )
{
if( createBackups )
{
( ( WsdlTestCase )testCase ).importTestStep( testStep,
"Backup of [" + testStep.getName() + "]", -1, true ).setDisabled( true );
}
( ( WsdlRequest )testRequest ).setRequestContent( newRequest );
count++ ;