Package org.apache.cxf.message

Examples of org.apache.cxf.message.FaultMode


            if (isOutboundObserver()) {
                Exception ex = message.getContent(Exception.class);
                if (!(ex instanceof Fault)) {
                    ex = new Fault(ex);
                }
                FaultMode mode = message.get(FaultMode.class);
               
                faultMessage = exchange.getOutMessage();
                if (null == faultMessage) {
                    faultMessage = new MessageImpl();
                    faultMessage.setExchange(exchange);
View Full Code Here


                                                 false)) {
            processFaultDetail(fault, msg);
            setStackTrace(fault, msg);
        }

        FaultMode faultMode = FaultMode.UNCHECKED_APPLICATION_FAULT;

        // Check if the raised exception is declared in the WSDL or by the JAX-RS resource
        Method m = msg.getExchange().get(Method.class);
        if (m != null) {
            Exception e = msg.getContent(Exception.class);
View Full Code Here

            CURRENT_MESSAGE.set(oldMessage);
        }
    }

    private void doDefaultLogging(Message message, Exception ex, StringBuilder description) {
        FaultMode mode = message.get(FaultMode.class);
        if (mode == FaultMode.CHECKED_APPLICATION_FAULT) {
            if (isFineLogging) {
                LogUtils.log(LOG, Level.FINE,
                             "Application " + description
                             + "has thrown exception, unwinding now", ex);
View Full Code Here

            } catch (RuntimeException exception) {
                Exchange exchange = message.getExchange();
               
                Exception ex = new Fault(exception);

                FaultMode mode = message.get(FaultMode.class);               
               
                Message faultMessage = exchange.getOutMessage();
                if (null == faultMessage) {
                    faultMessage = new MessageImpl();
                    faultMessage.setExchange(message.getExchange());
View Full Code Here

            }
        }
    }
   
    boolean isRuntimeFault(Message message) {
        FaultMode mode = MessageUtils.getFaultMode(message);
        if (null == mode) {
            return false;
        }
        return FaultMode.CHECKED_APPLICATION_FAULT != mode;
    }
View Full Code Here

                   
                    if (!faultOccurred) {
    
                        faultOccurred = true;
                                           
                        FaultMode mode = message.get(FaultMode.class);
                        if (mode == FaultMode.CHECKED_APPLICATION_FAULT) {
                            if (LOG.isLoggable(Level.FINE)) {
                                LogUtils.log(LOG, Level.FINE,
                                             "Application has thrown exception, unwinding now", ex);
                            } else if (LOG.isLoggable(Level.INFO)) {
View Full Code Here

                                                 false)) {
            processFaultDetail(fault, msg);
            setStackTrace(fault, msg);
        }

        FaultMode faultMode = FaultMode.UNCHECKED_APPLICATION_FAULT;

        // Check if the raised exception is declared in the WSDL or by the JAX-RS resource
        Method m = msg.getExchange().get(Method.class);
        if (m != null) {
            Exception e = msg.getContent(Exception.class);
View Full Code Here

                                                 false)) {
            processFaultDetail(fault, msg);
            setStackTrace(fault, msg);
        }

        FaultMode faultMode = FaultMode.UNCHECKED_APPLICATION_FAULT;

        // Check if the raised exception is declared in the WSDL or by the JAX-RS resource
        Method m = msg.getExchange().get(Method.class);
        if (m != null) {
            Exception e = msg.getContent(Exception.class);
View Full Code Here

            } catch (RuntimeException exception) {
                Exchange exchange = message.getExchange();
               
                Exception ex = new Fault(exception);

                FaultMode mode = (FaultMode)message.get(FaultMode.class);               
               
                Message faultMessage = exchange.getOutMessage();
                if (null == faultMessage) {
                    faultMessage = new MessageImpl();
                    faultMessage.setExchange(message.getExchange());
View Full Code Here

                } catch (RuntimeException ex) {
                    if (!faultOccurred) {
    
                        faultOccurred = true;
                                           
                        FaultMode mode = message.get(FaultMode.class);
                        if (mode == FaultMode.CHECKED_APPLICATION_FAULT) {
                            if (LOG.isLoggable(Level.FINE)) {
                                LogUtils.log(LOG, Level.FINE,
                                             "Application has thrown exception, unwinding now", ex);
                            } else if (LOG.isLoggable(Level.INFO)) {
View Full Code Here

TOP

Related Classes of org.apache.cxf.message.FaultMode

Copyright © 2018 www.massapicom. 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.