Examples of createMessage()


Examples of com.gitblit.service.MailService.createMessage()

  public void testSendMail() throws Exception {
    FileSettings settings = new FileSettings("mailtest.properties");
    MailService mail = new MailService(settings);
    Mailing mailing = Mailing.newPlain();
    mailing.setRecipients(settings.getStrings(Keys.mail.adminAddresses));
    Message message = mail.createMessage(mailing);
    message.setSubject("Test");
    message.setText("Lägger till andra stycket i ny fil. UTF-8 encoded");
    mail.queue(message);
    mail.run();
View Full Code Here

Examples of com.sun.xml.rpc.spi.runtime.SOAPMessageContext.createMessage()

        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
    }

    protected byte[] readFully(InputStream istream) throws IOException {
View Full Code Here

Examples of com.volantis.mps.bms.MessageFactory.createMessage()

        alice.setChannel("smtp");

        SendRequest request = factory.createSendRequest();
        request.addRecipient(alice);

        Message message = factory.createMessage(
                new URL("http://localhost:8080/volantis/welcome/welcome.xdime"));
        message.setSubject("Hello");
        request.setMessage(message);

        ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

Examples of ioke.lang.Runtime.createMessage()

    public static void voidInvocation(IokeJavaIntegrated object, Object[] args, String name) {
        IokeObject pr = object.__get_IokeProxy();
        Runtime runtime = object.__get_IokeRuntime();
        Message newMessage = new Message(runtime, name);
        for(Object arg : args) {
            newMessage.getArguments(null).add(runtime.createMessage(Message.wrap(arg, runtime)));
        }

        try {
            IokeObject msg = runtime.createMessage(newMessage);
            Interpreter.send(msg, runtime.ground, pr);
View Full Code Here

Examples of javax.jbi.messaging.InOnly.createMessage()

        try {
            String name = aFile.getCanonicalPath();
            in = new BufferedInputStream(new FileInputStream(aFile));
            InOnly exchange = getExchangeFactory().createInOnlyExchange();
            configureExchangeTarget(exchange);
            NormalizedMessage message = exchange.createMessage();
            exchange.setInMessage(message);
            marshaler.readMessage(exchange, message, in, name);
            sendSync(exchange);
            if (exchange.getStatus() == ExchangeStatus.ERROR) {
                Exception e = exchange.getError();
View Full Code Here

Examples of javax.jbi.messaging.InOptionalOut.createMessage()

        return exchange;
    }

    public InOptionalOut createInOptionalOutExchange() throws MessagingException {
        InOptionalOut exchange = getExchangeFactory().createInOptionalOutExchange();
        NormalizedMessage in = exchange.createMessage();
        exchange.setInMessage(in);
        return exchange;
    }

    public InOptionalOut createInOptionalOutExchange(EndpointResolver resolver) throws JBIException {
View Full Code Here

Examples of javax.jbi.messaging.InOut.createMessage()

       
        channel.createExchangeFactoryForService(serviceName);
        EasyMock.expectLastCall().andReturn(factory);
        factory.createInOutExchange();
        EasyMock.expectLastCall().andReturn(exchange);
        exchange.createMessage();
        EasyMock.expectLastCall().andReturn(message);
        exchange.getEndpoint();
        EasyMock.expectLastCall().andReturn(null);
        message.setContent((Source)EasyMock.notNull());
        exchange.setService(serviceName);
View Full Code Here

Examples of javax.jbi.messaging.InOut.createMessage()

           
            MessageExchangeFactory factory = channel.createExchangeFactoryForService(serviceName);
            LOG.fine("create message exchange svc: " + serviceName);
            InOut xchng = factory.createInOutExchange();
           
            NormalizedMessage inMsg = xchng.createMessage();
            LOG.fine("exchange endpoint: " + xchng.getEndpoint());
           
            InputStream ins = null;
           
            if (inMsg != null) {
View Full Code Here

Examples of javax.jbi.messaging.MessageExchange.createMessage()

            DocumentBuilder builder = docBuilderFactory.newDocumentBuilder();
            Document doc = builder.parse(bais);
           
            MessageExchange xchng = (MessageExchange)ctx.get(MESSAGE_EXCHANGE_PROPERTY);
            LOG.fine("creating NormalizedMessage");
            NormalizedMessage msg = xchng.createMessage();
            msg.setContent(new DOMSource(doc));
            xchng.setMessage(msg, "out");
            LOG.fine("postDispatch sending out message to NWR");
            channel.send(xchng);
        } catch (Exception ex) {
View Full Code Here

Examples of javax.jbi.messaging.RobustInOnly.createMessage()

        InputStream in = content.getInputStream();
        if (in == null) {
            throw new JBIException("No input available for file!");
        }
        RobustInOnly exchange = getExchangeFactory().createRobustInOnlyExchange();
        NormalizedMessage message = exchange.createMessage();
        exchange.setInMessage(message);
        marshaler.readMessage(exchange, message, in, name);
        getDeliveryChannel().sendSync(exchange);
        in.close();
        content.close();
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.