Package javax.jbi.messaging

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


                        }
                    } else {
                        xchng.setError(f);
                    }
                } else {
                    NormalizedMessage msg = xchng.createMessage();
                    //copy attachments
                    if (outMessage != null && outMessage.getAttachments() != null) {
                        for (Attachment att : outMessage.getAttachments()) {
                            msg.addAttachment(att.getId(), att
                                    .getDataHandler());
View Full Code Here


                xchng = factory.createRobustInOnlyExchange();
            } else {
                xchng = factory.createInOutExchange();
            }

            NormalizedMessage inMsg = xchng.createMessage();
            LOG.info(new org.apache.cxf.common.i18n.Message("EXCHANGE.ENDPOINT", LOG).toString()
                     + xchng.getEndpoint());
            if (inMsg != null) {
                LOG.info("setup message contents on " + inMsg);
                inMsg.setContent(getMessageContent(message));
View Full Code Here

 
    protected void testSerializeDeserialize(Source src) throws Exception {
        MessageExchange me = new InOnlyImpl("exchangeId");
        me.setOperation(new QName("uri", "op"));
        me.setProperty("myProp", "myValue");
        NormalizedMessage msg = me.createMessage();
        msg.setProperty("myMsgProp", "myMsgValue");
        msg.setContent(src);
        msg.addAttachment("myAttachment", new DataHandler(new StreamDataSource(new ByteArrayInputStream("hello".getBytes()))));
        me.setMessage(msg, "in");
        assertNotNull(((NormalizedMessageImpl) msg).getBody());
View Full Code Here

                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
                } else {
                    NormalizedMessage msg = xchng.createMessage();
                    msg.setContent(new DOMSource(doc));
                    xchng.setMessage(msg, "out");
                   
                }
                LOG.fine(new org.apache.cxf.common.i18n.Message(
View Full Code Here

                xchng = factory.createRobustInOnlyExchange();
            } else {
                xchng = factory.createInOutExchange();
            }

            NormalizedMessage inMsg = xchng.createMessage();
            LOG.info(new org.apache.cxf.common.i18n.Message("EXCHANGE.ENDPOINT", LOG).toString()
                     + xchng.getEndpoint());
            if (inMsg != null) {
                LOG.info("setup message contents on " + inMsg);
                inMsg.setContent(getMessageContent(message));
View Full Code Here

                xchng = factory.createRobustInOnlyExchange();
            } else {
                xchng = factory.createInOutExchange();
            }

            NormalizedMessage inMsg = xchng.createMessage();
            LOG.info(new org.apache.cxf.common.i18n.Message("EXCHANGE.ENDPOINT", LOG).toString()
                     + xchng.getEndpoint());
            if (inMsg != null) {
                LOG.info("setup message contents on " + inMsg);
                inMsg.setContent(getMessageContent(message));
View Full Code Here

                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
                } else {
                    NormalizedMessage msg = xchng.createMessage();
                    msg.setContent(new DOMSource(doc));
                    xchng.setMessage(msg, "out");
                   
                }
                LOG.fine(new org.apache.cxf.common.i18n.Message(
View Full Code Here

                xchng = factory.createRobustInOnlyExchange();
            } else {
                xchng = factory.createInOutExchange();
            }

            NormalizedMessage inMsg = xchng.createMessage();
            LOG.info(new org.apache.cxf.common.i18n.Message("EXCHANGE.ENDPOINT", LOG).toString()
                     + xchng.getEndpoint());
            if (inMsg != null) {
                LOG.info("setup message contents on " + inMsg);
                inMsg.setContent(getMessageContent(message));
View Full Code Here

        Message message = new MessageImpl();
        message.setExchange(exchange);
       
       
        MessageExchange messageExchange = control.createMock(MessageExchange.class);
        EasyMock.expect(messageExchange.createMessage()).andReturn(normalizedMessage);
        message.put(MessageExchange.class, messageExchange);
        channel.send(messageExchange);
        EasyMock.replay(channel);
       
        JBIDestinationOutputStream jbiOS = new JBIDestinationOutputStream(message, null, channel);
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.