Package org.codehaus.xfire.attachments

Examples of org.codehaus.xfire.attachments.SimpleAttachment


        if (in.getAttachmentNames() != null && in.getAttachmentNames().size() > 0) {
            JavaMailAttachments attachments = new JavaMailAttachments();
            for (Iterator it = in.getAttachmentNames().iterator(); it.hasNext();) {
                String name = (String) it.next();
                DataHandler dh = in.getAttachment(name);
                attachments.addPart(new SimpleAttachment(name, dh));
            }
            msg.setAttachments(attachments);
        }
        EndpointDeliveryChannel.setEndpoint(endpoint);
        JBIContext.setMessageExchange(exchange);
View Full Code Here


        if (in.getAttachmentNames() != null && in.getAttachmentNames().size() > 0) {
            JavaMailAttachments attachments = new JavaMailAttachments();
            for (Iterator it = in.getAttachmentNames().iterator(); it.hasNext();) {
                String name = (String) it.next();
                DataHandler dh = in.getAttachment(name);
                attachments.addPart(new SimpleAttachment(name, dh));
            }
            msg.setAttachments(attachments);
        }
        c.receive(ctx, msg);
        c.close();
View Full Code Here

        as.setComponent(new HttpSoapConnector(null, PORT, true));
        as.setDestinationService(new QName("echo"));
        container.activateComponent(as);

        JavaMailAttachments sendAtts = new JavaMailAttachments();
        sendAtts.setSoapMessage(new SimpleAttachment("soap-request.xml",
                createDataHandler("soap-request.xml")));
        sendAtts.addPart(new SimpleAttachment("ServiceMix.jpg",
                createDataHandler("ServiceMix.jpg")));
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        sendAtts.write(bos);
        InputStream is = new ByteArrayInputStream(bos.toByteArray());
        PostMethod method = new PostMethod("http://localhost:" + PORT);
View Full Code Here

        as.setComponent(new HttpSoapConnector(null, PORT, true));
        as.setDestinationService(new QName("echo"));
        container.activateComponent(as);

        JavaMailAttachments sendAtts = new JavaMailAttachments();
        sendAtts.setSoapMessage(new SimpleAttachment("soap-request.xml",
                createDataHandler("soap-request.xml")));
        sendAtts.addPart(new SimpleAttachment("ServiceMix.jpg",
                createDataHandler("ServiceMix.jpg")));
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        sendAtts.write(bos);
        InputStream is = new ByteArrayInputStream(bos.toByteArray());
        PostMethod method = new PostMethod("http://localhost:" + PORT);
View Full Code Here

        as.setComponent(new HttpSoapConnector(null, PORT, true));
        as.setDestinationService(new QName("echo"));
        container.activateComponent(as);

        JavaMailAttachments sendAtts = new JavaMailAttachments();
        sendAtts.setSoapMessage(new SimpleAttachment("soap-request.xml",
                createDataHandler("soap-request.xml")));
        sendAtts.addPart(new SimpleAttachment("ServiceMix.jpg",
                createDataHandler("ServiceMix.jpg")));
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        sendAtts.write(bos);
        InputStream is = new ByteArrayInputStream(bos.toByteArray());
        PostMethod method = new PostMethod("http://localhost:" + PORT);
View Full Code Here

        if (in.getAttachmentNames() != null && in.getAttachmentNames().size() > 0) {
            JavaMailAttachments attachments = new JavaMailAttachments();
            for (Iterator it = in.getAttachmentNames().iterator(); it.hasNext();) {
                String name = (String) it.next();
                DataHandler dh = in.getAttachment(name);
                attachments.addPart(new SimpleAttachment(name, dh));
            }
            msg.setAttachments(attachments);
        }
        EndpointDeliveryChannel.setEndpoint(endpoint);
        JBIContext.setMessageExchange(exchange);
View Full Code Here

        ByteDataSource source = new ByteDataSource(data, offset, length);
        source.setContentType(mimeType);
        DataHandler handler = new DataHandler(source);
       
        String id = AttachmentUtil.createContentID(elementNamespace);
        SimpleAttachment att = new SimpleAttachment(id, handler);
        att.setXOP(true);
        atts.addPart(att);
        return "cid:" +id;
    }
View Full Code Here

            atts = new JavaMailAttachments();
            context.getOutMessage().setAttachments(atts);
        }

        String id = AttachmentUtil.createContentID(elementNS);
        SimpleAttachment att = new SimpleAttachment(id, handler);
        atts.addPart(att);
        att.setXOP(true);
        return "cid:" +id;
    }
View Full Code Here

            atts = new JavaMailAttachments();
            context.getOutMessage().setAttachments(atts);
        }

        String id = UID.generate() + "@" + handler.getName();
        SimpleAttachment att = new SimpleAttachment(id, handler);
        atts.addPart(att);
       
        return id;
    }
View Full Code Here

   
    protected Attachment createAttachment(Object object, String id)
    {
        DataHandler handler = (DataHandler) object;
       
        SimpleAttachment att = new SimpleAttachment(id, handler);
        att.setXOP(true);
       
        return att;
    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.attachments.SimpleAttachment

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.