Package com.eviware.soapui.impl.wsdl.support

Examples of com.eviware.soapui.impl.wsdl.support.MockFileAttachment


  {
    super( config, operation, "/mockResponse.gif" );

    for( AttachmentConfig ac : getConfig().getAttachmentList() )
    {
      attachments.add( new MockFileAttachment( ac, this ) );
    }

    if( !config.isSetEncoding() )
      config.setEncoding( "UTF-8" );
View Full Code Here


    }
  }

  public Attachment attachFile( File file, boolean cache ) throws IOException
  {
    FileAttachment<WsdlMockResponse> fileAttachment = new MockFileAttachment( file, cache, this );
    attachments.add( fileAttachment );
    notifyPropertyChanged( ATTACHMENTS_PROPERTY, null, fileAttachment );
    return fileAttachment;
  }
View Full Code Here

        newConfig.setData( Tools.readAll( att.getInputStream(), 0 ).toByteArray() );
        newConfig.setContentId( att.getContentID() );
        newConfig.setContentType( att.getContentType() );
        newConfig.setName( att.getName() );

        FileAttachment<WsdlMockResponse> newAttachment = new MockFileAttachment( newConfig, this );
        attachments.add( newAttachment );
        return newAttachment;
      }
      catch( Exception e )
      {
        SoapUI.logError( e );
      }
    }
    else if( attachment instanceof FileAttachment )
    {
      AttachmentConfig oldConfig = ( ( FileAttachment<WsdlMockResponse> )attachment ).getConfig();
      AttachmentConfig newConfig = ( AttachmentConfig )getConfig().addNewAttachment().set( oldConfig );
      FileAttachment<WsdlMockResponse> newAttachment = new MockFileAttachment( newConfig, this );
      attachments.add( newAttachment );
      return newAttachment;
    }

    return null;
View Full Code Here

        addAttachment(mockResponse);
        return mockResponse;
    }

    public void addAttachment(WsdlMockResponse mockResponse) throws IOException {
        Attachment attachment = new MockFileAttachment(File.createTempFile("attach", "file"), false, mockResponse);
        mockResponse.addAttachment(attachment);
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.support.MockFileAttachment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.