Examples of BodyPartAttachment


Examples of com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.BodyPartAttachment

  {
    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;
      }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.submit.transports.http.support.attachments.BodyPartAttachment

    @SuppressWarnings("unchecked")
    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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.