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

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


    protected List<FileAttachment<?>> getAttachmentsList() {
        return attachments;
    }

    public Attachment attachBinaryData(byte[] data, String contentType) {
        RequestFileAttachment fileAttachment;
        try {
            File temp = File.createTempFile("binaryContent", ".tmp");

            OutputStream out = new FileOutputStream(temp);
            out.write(data);
            out.close();
            fileAttachment = new RequestFileAttachment(temp, false, this);
            fileAttachment.setContentType(contentType);
            attachments.add(fileAttachment);
            notifyPropertyChanged(ATTACHMENTS_PROPERTY, null, fileAttachment);
            return fileAttachment;
        } catch (IOException e) {
            SoapUI.logError(e);
View Full Code Here


    }

    private RequestFileAttachment createMissingAttachment(HttpRequest request, URL url,
                                                          FailingHttpStatusCodeException fhsce) throws IOException {
        File temp = new File(fhsce.getStatusCode() + "_" + fhsce.getStatusMessage() + "_" + url.toString());
        RequestFileAttachment missingFile = new RequestFileAttachment(temp, false, (AbstractHttpRequest<?>) request);
        missingResourcesList.add(fhsce.getStatusCode() + " " + fhsce.getStatusMessage() + " " + url.toString());
        return missingFile;
    }
View Full Code Here

        File temp = File.createTempFile(fileName, extension);
        OutputStream out = new FileOutputStream(temp);
        out.write(bytes);
        out.close();
        return new RequestFileAttachment(temp, false, (AbstractHttpRequest<?>) request);
    }
View Full Code Here

            bytesMessageReceive.reset();
            while (bytesMessageReceive.readBytes(buff) != -1) {
                out.write(buff);
            }
            out.close();
            Attachment[] attachments = new Attachment[]{new RequestFileAttachment(temp, false,
                    (AbstractHttpRequest<?>) request)};
            jmsResponse.setAttachments(attachments);
        } catch (IOException e) {
            SoapUI.logError(e);
        }
View Full Code Here

TOP

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

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.