Examples of addAttachment()


Examples of org.apache.axis2.context.MessageContext.addAttachment()

        MessageContext mc = new MessageContext();

        System.out.println("Sending file : " + fileName + " as SwA");
        FileDataSource fileDataSource = new FileDataSource(new File(fileName));
        DataHandler dataHandler = new DataHandler(fileDataSource);
        String attachmentID = mc.addAttachment(dataHandler);


        SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        SOAPEnvelope env = factory.getDefaultEnvelope();
        OMNamespace ns = factory.createOMNamespace("http://services.samples", "m0");
View Full Code Here

Examples of org.apache.camel.Message.addAttachment()

        // create the exchange with the mail message that is multipart with a file and a Hello World text/plain message.
        Exchange exchange = endpoint.createExchange();
        Message in = exchange.getIn();
        in.setBody("Hello World");
        in.addAttachment("logo.jpeg", new DataHandler(new FileDataSource("src/test/data/logo.jpeg")));

        // create a producer that can produce the exchange (= send the mail)
        Producer producer = endpoint.createProducer();
        // start the producer
        producer.start();
View Full Code Here

Examples of org.apache.camel.impl.DefaultMessage.addAttachment()

                camelMessage.setHeader(property.getName(), property.getValue());
            }
        }
       
        for (String attachmentName : syExchange.getMessage().getAttachmentMap().keySet()) {
            camelMessage.addAttachment(attachmentName,
                    new DataHandler(syExchange.getMessage().getAttachment(attachmentName)));
        }
       
        return camelMessage;
    }
View Full Code Here

Examples of org.apache.cocoon.mail.MailMessageSender.addAttachment()

                    String srcName = tz.nextToken();

                    if (srcName.indexOf(":") == -1) {
                        //if (request instanceof MultipartHttpServletRequest) {
                            Object obj = request.get(srcName);
                            mms.addAttachment(obj);
                            if (this.getLogger().isDebugEnabled()) {
                                getLogger().debug("request-attachment: " + obj);
                            }
                        //}
                    } else {
View Full Code Here

Examples of org.apache.cocoon.mail.MailSender.addAttachment()

                for (int i = 0; i < fileName.length; i++) {
                    String srcName = fileName[i];

                    if (srcName.indexOf(":") == -1) {
                        Object obj = request.get(srcName);
                        mms.addAttachment(obj);
                        if (getLogger().isDebugEnabled()) {
                            getLogger().debug("request-attachment: " + obj);
                        }
                    } else {
                        mms.addAttachmentURL(srcName);
View Full Code Here

Examples of org.apache.jmeter.protocol.smtp.sampler.protocol.SendMailCommand.addAttachment()

                        if(!file.isAbsolute() && !file.exists()){
                            log.debug("loading file with relative path: " +attachment);
                            file = new File(FileServer.getFileServer().getBaseDir(), attachment);
                            log.debug("file path set to: "+attachment);
                        }
                        instance.addAttachment(file);
                    }
                }

            }
View Full Code Here

Examples of org.apache.servicemix.nmr.api.Message.addAttachment()

        e.setOperation(new QName("op"));
        e.setProperty("key", "value");
        e.setStatus(Status.Done);
        Message msg = e.getIn();
        msg.setHeader("header", "value");
        msg.addAttachment("id", "att");
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream os = new ObjectOutputStream(baos);
        os.writeObject(e);
        os.close();
        ObjectInputStream is = new ObjectInputStream(new ByteArrayInputStream(baos.toByteArray()));
View Full Code Here

Examples of org.bukkit.craftbukkit.v1_6_R3.entity.CraftPlayer.addAttachment()

  public SpoutCraftPlayer(CraftServer server, EntityPlayer entity) {
    super(server, entity);
    createInventory(null);
    if (entity.playerConnection != null) {
      CraftPlayer player = entity.playerConnection.getPlayer();
      perm = new SpoutPermissibleBase(player.addAttachment(Bukkit.getServer().getPluginManager().getPlugin("Spout")).getPermissible());
      perm.recalculatePermissions();

      hasPlayed = player.hasPlayedBefore();
      lastPlayed = player.getLastPlayed();
      firstPlayed = player.getFirstPlayed();
View Full Code Here

Examples of org.bukkit.entity.Player.addAttachment()

            }
        }
       
        // create if attachment doesn't exist
        if (attachment == null) {
            attachment = player.addAttachment(plugin);
            attachment.setPermission(permName, true);
        }
       
        // recalculate!
        player.recalculatePermissions();
View Full Code Here

Examples of org.compiere.util.EMail.addAttachment()

          File invoice = null;
          if (!Ini.isClient())
            invoice = new File(MInvoice.getPDFFileName(documentDir, C_Invoice_ID));
          File attachment = re.getPDF(invoice);
          log.fine(to + " - " + attachment);
          email.addAttachment(attachment);
          //
          String msg = email.send();
          MUserMail um = new MUserMail(mText, getAD_User_ID(), email);
          um.save();
          if (msg.equals(EMail.SENT_OK))
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.