Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.AttachmentConfig


      params.resetPropertiesConfig( request.getParameters() );

    List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
    for( int i = 0; i < attachmentConfigs.size(); i++ )
    {
      AttachmentConfig config = attachmentConfigs.get( i );
      getAttachmentsList().get( i ).updateConfig( config );
    }

    if( jmsHeaderConfig != null )
    {
View Full Code Here


    updateParams();

    List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
    for( int i = 0; i < attachmentConfigs.size(); i++ )
    {
      AttachmentConfig config = attachmentConfigs.get( i );
      getAttachmentsList().get( i ).updateConfig( config );
    }

    if( jmsHeaderConfig != null )
    {
View Full Code Here

  public Attachment importAttachment( Attachment attachment )
  {
    if( attachment instanceof FileAttachment<?> )
    {
      AttachmentConfig oldConfig = ( ( FileAttachment<?> )attachment ).getConfig();
      AttachmentConfig newConfig = ( AttachmentConfig )getConfig().addNewAttachment().set( oldConfig );
      RequestFileAttachment newAttachment = new RequestFileAttachment( newConfig, this );
      attachments.add( newAttachment );
      return newAttachment;
    }
    else
View Full Code Here

    assertionsSupport.refresh();

    List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
    for( int i = 0; i < attachmentConfigs.size(); i++ )
    {
      AttachmentConfig config = attachmentConfigs.get( i );
      getAttachmentsList().get( i ).updateConfig( config );
    }

  }
View Full Code Here

    {
      try
      {
        BodyPartAttachment att = ( BodyPartAttachment )attachment;

        AttachmentConfig newConfig = getConfig().addNewAttachment();
        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;
    }
View Full Code Here

            params.resetPropertiesConfig(request.getParameters());
        }

        List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
        for (int i = 0; i < attachmentConfigs.size(); i++) {
            AttachmentConfig config = attachmentConfigs.get(i);
            getAttachmentsList().get(i).updateConfig(config);
        }

        if (jmsHeaderConfig != null) {
            jmsHeaderConfig.setJMSHeaderConfConfig(request.getJmsConfig());
View Full Code Here

        }
    }

    public Attachment importAttachment(Attachment attachment) {
        if (attachment instanceof FileAttachment<?>) {
            AttachmentConfig oldConfig = ((FileAttachment<?>) attachment).getConfig();
            AttachmentConfig newConfig = (AttachmentConfig) getConfig().addNewAttachment().set(oldConfig);
            RequestFileAttachment newAttachment = new RequestFileAttachment(newConfig, this);
            attachments.add(newAttachment);
            return newAttachment;
        } else {
            log.error("Unknown attachment type: " + attachment);
View Full Code Here

        assertionsSupport.refresh();

        List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
        for (int i = 0; i < attachmentConfigs.size(); i++) {
            AttachmentConfig config = attachmentConfigs.get(i);
            getAttachmentsList().get(i).updateConfig(config);
        }

    }
View Full Code Here

        updateParams();

        List<AttachmentConfig> attachmentConfigs = getConfig().getAttachmentList();
        for (int i = 0; i < attachmentConfigs.size(); i++) {
            AttachmentConfig config = attachmentConfigs.get(i);
            getAttachmentsList().get(i).updateConfig(config);
        }

        if (jmsHeaderConfig != null) {
            jmsHeaderConfig.setJMSHeaderConfConfig(request.getJmsConfig());
View Full Code Here

    public Attachment addAttachment(Attachment attachment) {
        if (attachment instanceof BodyPartAttachment) {
            try {
                BodyPartAttachment att = (BodyPartAttachment) attachment;

                AttachmentConfig newConfig = getConfig().addNewAttachment();
                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;
        }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.AttachmentConfig

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.