Package javax.jbi.messaging

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


                }
                if (message.getContent(Exception.class) == null) {
                    nm = exchange.createMessage();
                    exchange.setMessage(nm, "out");
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
View Full Code Here


                    if (nm == null) {
                        nm = exchange.createMessage();
                        exchange.setMessage(nm, "out");
                    }
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
View Full Code Here

        MessageExchange me = this.exchange.getInternalExchange();
        if (me instanceof InOnly) {
            me.setError(new Exception(content));
            getChannel().send(me);
        } else {
            Fault fault = me.createFault();
            fault.setContent(new StringSource(content));
            me.setFault(fault);
            getChannel().sendSync(me);
        }
        update();
View Full Code Here

                    "CREATE.NORMALIZED.MESSAGE", LOG).toString());
                if (inMessage.getExchange().getOutFaultMessage() != null) {
                    org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
                            inMessage.getContent(Exception.class);
                    if (!(f.getCause() instanceof Error)) {
                        Fault fault = xchng.createFault();
                        fault.setContent(new DOMSource(doc));
                        xchng.setFault(fault);
                        if (!f.hasDetails()) {
                            xchng.setProperty("faultstring", f.getMessage());
                        }
View Full Code Here

        MessageExchange me = this.exchange.getInternalExchange();
        if (me instanceof InOnly) {
            me.setError(new Exception(new SourceTransformer().toString(content)));
            getChannel().send(me);
        } else {
            Fault fault = me.createFault();
            fault.setContent(content);
            me.setFault(fault);
            getChannel().send(me);
        }
        exchangeHandled = true;
View Full Code Here

                    "CREATE.NORMALIZED.MESSAGE", LOG).toString());
                if (inMessage.getExchange().getOutFaultMessage() != null) {
                    org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
                            inMessage.getContent(Exception.class);
                    if (f.hasDetails()) {
                        Fault fault = xchng.createFault();
                        fault.setContent(new DOMSource(doc));
                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
View Full Code Here

                    "CREATE.NORMALIZED.MESSAGE", LOG).toString());
                if (inMessage.getExchange().getOutFaultMessage() != null) {
                    org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
                            inMessage.getContent(Exception.class);
                    if (f.hasDetails()) {
                        Fault fault = xchng.createFault();
                        fault.setContent(new DOMSource(doc));
                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
View Full Code Here

                }
                if (message.getContent(Exception.class) == null) {
                    nm = exchange.createMessage();
                    exchange.setMessage(nm, "out");
                } else {
                    exchange.setFault(exchange.createFault());
                    nm = exchange.getFault();
                }
            }
            // Put headers
            toNMSHeaders(nm, message);
View Full Code Here

                    "CREATE.NORMALIZED.MESSAGE", LOG).toString());
                if (inMessage.getExchange().getOutFaultMessage() != null) {
                    org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
                            inMessage.getContent(Exception.class);
                    if (f.hasDetails()) {
                        Fault fault = xchng.createFault();
                        fault.setContent(new DOMSource(doc));
                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
View Full Code Here

                    "CREATE.NORMALIZED.MESSAGE", LOG).toString());
                if (inMessage.getExchange().getOutFaultMessage() != null) {
                    org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
                            inMessage.getContent(Exception.class);
                    if (f.hasDetails()) {
                        Fault fault = xchng.createFault();
                        fault.setContent(new DOMSource(doc));
                        xchng.setFault(fault);
                    } else {
                        xchng.setError(f);
                    }
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.