Package javax.jbi.messaging

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


                    exchange.getFault().setBody(messageExchange.getFault().getContent());
                } else {
                    exchange.getOut().setBody(messageExchange.getMessage("out").getContent());
                }
                messageExchange.setStatus(ExchangeStatus.DONE);
                deliveryChannel.send(messageExchange);
            }

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


                        me.setStatus(ExchangeStatus.DONE);
                    } catch (Exception e) {
                        me.setError(e);
                        throw new ActionSystemException(e);
                    } finally {
                        channel.send(me);
                    }
                    Element e = fault.getDocumentElement();
                    // Try to determine fault name
                    String faultName = e.getLocalName();
                    String partName = BPEComponent.PART_PAYLOAD;
View Full Code Here

                        me.setStatus(ExchangeStatus.DONE);
                    } catch (Exception e) {
                        me.setError(e);
                        throw new ActionSystemException(e);
                    } finally {
                        channel.send(me);
                    }
                }
            } else if (me.getStatus() == ExchangeStatus.ERROR) {
                // Extract error
                Exception error = me.getError();
View Full Code Here

                        String str = getTransformer().contentToString(me.getFault());
                        getTransformer().toResult(new StringSource(str), result);
                        Element e = result.getDocument().getRootElement();
                        e = (Element) e.clone();
                        me.setStatus(ExchangeStatus.DONE);
                        channel.send(me);
                        XFireFault xfireFault = new XFireFault(str, XFireFault.RECEIVER);
                        xfireFault.getDetail().addContent(e);
                        throw xfireFault;
                    } else if (me.getMessage("out") != null) {
                        Source outSrc = me.getMessage("out").getContent();
View Full Code Here

                    } else if (me.getMessage("out") != null) {
                        Source outSrc = me.getMessage("out").getContent();
                        InMessage inMessage = new InMessage(getTransformer().toXMLStreamReader(outSrc), getUri());
                        getEndpoint().onReceive(context, inMessage);
                        me.setStatus(ExchangeStatus.DONE);
                        channel.send(me);
                    }
                }
            } catch (XFireException e) {
                throw e;
            } catch (Exception e) {
View Full Code Here

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

            msg.setContent(src);
            inout.setInMessage(msg);
            channel.sendSync(inout);
            Source outSrc = inout.getOutMessage().getContent();
            inout.setStatus(ExchangeStatus.DONE);
            channel.send(inout);
            return outSrc;
        }
    }
   
}
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

            exchange.setInMessage(message);

            message.setProperty("id", new Integer(i));
            message.setContent(new StringSource("<example id='" + i + "'/>"));

            deliveryChannel.send(exchange);
        }
    }

    // ComponentLifeCycle interface
    //-------------------------------------------------------------------------
View Full Code Here

                DeliveryChannel deliveryChannel = context.getDeliveryChannel();
                System.out.println("sync send on deliverychannel: " + deliveryChannel);
                if (sync) {
                  deliveryChannel.sendSync(exchange);
                } else {
                  deliveryChannel.send(exchange);
                }
            }
        }
        else {
            log.warn("No endpoints available for interface: " + interfaceName);
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.