Package javax.jbi.messaging

Examples of javax.jbi.messaging.DeliveryChannel.send()


        nm.setContent(new StringSource("<request/>"));
        me.setInMessage(nm);
        channel.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        me.setStatus(ExchangeStatus.DONE);
        channel.send(me);

        if (!done.get()) {
            synchronized (done) {
                done.wait(5000);
            }
View Full Code Here


            } else {
                assertTrue(after - before < 4000);
            }
            assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
            me.setStatus(ExchangeStatus.DONE);
            channel.send(me);
            t.join();
        }
    }
   
    private MessageExchangeImpl createMessageExchange(final DeliveryChannelImpl channel) throws MessagingException {
View Full Code Here

      me.setInterfaceName(new QName(portType));
      me.setOperation(new QName(operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.send(me);
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
  }
View Full Code Here

      me.setInterfaceName(new QName(namespace, portType));
      me.setOperation(new QName(namespace, operation));
      NormalizedMessage in = me.createMessage();
      in.setContent(new DocumentSource(message));
      me.setMessage(in, "in");
      channel.send(me);
    } catch (Exception e) {
      throw new EngineRuntimeException(e);
    }
  }
View Full Code Here

                    exchange.getOut().setBody(messageExchange.getMessage("out").getContent());
                    addHeaders(messageExchange.getMessage("out"), exchange.getOut());
                    addAttachments(messageExchange.getMessage("out"), exchange.getOut());
                }
                messageExchange.setStatus(ExchangeStatus.DONE);
                deliveryChannel.send(messageExchange);
            }

        } catch (MessagingException e) {
            throw new JbiException(e);
        } catch (URISyntaxException e) {
View Full Code Here

        nm.setContent(new StringSource("<request/>"));
        me.setInMessage(nm);
        channel.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        me.setStatus(ExchangeStatus.DONE);
        channel.send(me);

        if (!done.get()) {
            synchronized (done) {
                done.wait(5000);
            }
View Full Code Here

            // TODO: check for error ?

            NormalizedMessage out = inout.getOutMessage();
            Object response = out.getContent();
            inout.setStatus(ExchangeStatus.DONE);
            channel.send(inout);

            return response;

        } catch (MessagingException e) {
            throw new InvocationTargetException(e);
View Full Code Here

            boolean sent = channel.sendSync(inout);
            // TODO: check for error ?
            NormalizedMessage out = inout.getOutMessage();
            Object response = context.createUnmarshaller().unmarshal(out.getContent());
            inout.setStatus(ExchangeStatus.DONE);
            channel.send(inout);
            return response;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

                me.setProperty(name, exchange.getProperty(name));
            }
            if (Boolean.TRUE.equals(exchange.getProperty(JbiConstants.SEND_SYNC))) {
                channel.sendSync(me);
            } else {
                channel.send(me);
            }
        }
    }

    public String getFlowName() {
View Full Code Here

                channel.sendSync(exchange);
                throw new XFireFault("No response", XFireFault.SENDER);
            }                   
            Source src = exchange.getOutMessage().getContent();
            exchange.setStatus(ExchangeStatus.DONE);
            channel.send(exchange);
            src = transformer.toDOMSource(src);
            return src;
        } catch (XFireFault e) {
            throw e;
        } catch (Exception e) {
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.