Package javax.jbi.messaging

Examples of javax.jbi.messaging.MessageExchangeFactory.createInOutExchange()


    }
   
  public void testInOut() throws Exception {
    // Send message exchange
    MessageExchangeFactory mef = consumer.getChannel().createExchangeFactoryForService(new QName("provider"));
    InOut mec = mef.createInOutExchange();
    NormalizedMessage m = mec.createMessage();
    m.setContent(new StringSource(PAYLOAD));
    mec.setInMessage(m);
    consumer.getChannel().send(mec);
    // Provider side
View Full Code Here


        }
      }
    }).start();
    // Send message exchange
    MessageExchangeFactory mef = consumer.getChannel().createExchangeFactoryForService(new QName("provider"));
    InOut mec = mef.createInOutExchange();
    NormalizedMessage m = mec.createMessage();
    m.setContent(new StringSource(PAYLOAD));
    mec.setInMessage(m);
    consumer.getChannel().sendSync(mec, 10000L);
    assertEquals(ExchangeStatus.ACTIVE, mec.getStatus());
View Full Code Here

      }
    });
    t.start();
    // Send message exchange
    MessageExchangeFactory mef = consumer.getChannel().createExchangeFactoryForService(new QName("provider"));
    InOut mec = mef.createInOutExchange();
    NormalizedMessage m = mec.createMessage();
    m.setContent(new StringSource(PAYLOAD));
    mec.setInMessage(m);
    consumer.getChannel().sendSync(mec, 10000L);
    assertEquals(ExchangeStatus.ACTIVE, mec.getStatus());
View Full Code Here

  }
 
  public void testInOutWithFault() throws Exception {
    // Send message exchange
    MessageExchangeFactory mef = consumer.getChannel().createExchangeFactoryForService(new QName("provider"));
    InOut mec = mef.createInOutExchange();
    NormalizedMessage m = mec.createMessage();
    m.setContent(new StringSource(PAYLOAD));
    mec.setInMessage(m);
    consumer.getChannel().send(mec);
    // Provider side
View Full Code Here

            if (isOneWay) {
                xchng = factory.createInOnlyExchange();
            } else if (bop.getOutput() == null) {
                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());
View Full Code Here

            if (isOneWay) {
                xchng = factory.createInOnlyExchange();
            } else if (bop.getOutput() == null) {
                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());
View Full Code Here

        exchange.put(BindingOperationInfo.class, boi);
        MessageExchangeFactory factory = control.createMock(MessageExchangeFactory.class);
        EasyMock.expect(channel.createExchangeFactoryForService(
                        null)).andReturn(factory);
        InOut xchg = control.createMock(InOut.class);
        EasyMock.expect(factory.createInOutExchange()).andReturn(xchg);
        NormalizedMessage inMsg = control.createMock(NormalizedMessage.class);
        EasyMock.expect(xchg.createMessage()).andReturn(inMsg);
        NormalizedMessage outMsg = control.createMock(NormalizedMessage.class);
        EasyMock.expect(xchg.getOutMessage()).andReturn(outMsg);
       
View Full Code Here

        }
       
        public Source twoWay(Source src) throws Exception {
            DeliveryChannel channel = context.getDeliveryChannel();
            MessageExchangeFactory factory = channel.createExchangeFactory();
            InOut inout = factory.createInOutExchange();
            inout.setService(ReceiverComponent.SERVICE);
            NormalizedMessage msg = inout.createMessage();
            msg.setContent(src);
            inout.setInMessage(msg);
            channel.sendSync(inout);
View Full Code Here

        } else {
            try {
                DeliveryChannel channel = ((JbiTransport) getTransport()).getContext().getDeliveryChannel();
                MessageExchangeFactory factory = channel.createExchangeFactory();
                if (context.getExchange().hasOutMessage()) {
                    InOut me = factory.createInOutExchange();
                    me.setInterfaceName((QName) context.getService().getProperty(JBI_INTERFACE_NAME));
                    me.setService((QName) context.getService().getProperty(JBI_SERVICE_NAME));
                    me.setEndpoint((ServiceEndpoint) context.getService().getProperty(JBI_ENDPOINT));
                    NormalizedMessage msg = me.createMessage();
                    me.setInMessage(msg);
View Full Code Here

        }
       
        public Source twoWay(Source src) throws Exception {
            DeliveryChannel channel = context.getDeliveryChannel();
            MessageExchangeFactory factory = channel.createExchangeFactory();
            InOut inout = factory.createInOutExchange();
            inout.setService(ReceiverComponent.SERVICE);
            NormalizedMessage msg = inout.createMessage();
            msg.setContent(src);
            inout.setInMessage(msg);
            channel.sendSync(inout);
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.