HttpTestRequestStep test = ( HttpTestRequestStep )testCase.insertTestStep(
httpRequestStepFactory.createConfig( me, "Monitor Request " + ( row + 1 ) ), -1 );
test.getTestRequest().setRequestHeaders( excludeHeaders( me.getRequestHeaders() ) );
HttpTestRequest request = ( HttpTestRequest )test.getHttpRequest();
request.setEndpoint( me.getTargetUrl().toString() );
// request.setIncomingWss( incomingRequestWss );
String existingMediaType = me.getResponseHeaders().get( "Content-Type", "" );
if( !StringUtils.isNullOrEmpty( existingMediaType ) )
{
request.setMediaType( existingMediaType );
}
if( "application/octet-stream".equals( existingMediaType )
|| "application/x-amf".equals( existingMediaType ) )
{
request.attachBinaryData( me.getRequestContent().getBytes(), existingMediaType );
}
else
{
request.setRequestContent( me.getRequestContent() );
test.getTestRequest().setRequestContent( me.getRequestContent() );
}
Attachment[] requestAttachments = me.getRequestAttachments();
if( requestAttachments != null )
{
for( Attachment attachment : requestAttachments )
{
request.importAttachment( attachment );
}
}
// }
}