Package org.apache.cxf.message

Examples of org.apache.cxf.message.FaultMode


            CURRENT_MESSAGE.set(oldMessage);
        }
    }

    private void doDefaultLogging(Message message, RuntimeException 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


            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

                                                 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

                //if exception occurs while writing a fault, we'll just let things continue
                //and let the rest of the chain try handling it as is.
                LOG.log(Level.WARNING, "EXCEPTION_WHILE_WRITING_FAULT", nex);
            }
        } else {
            FaultMode mode = message.get(FaultMode.class);
            if (mode == FaultMode.CHECKED_APPLICATION_FAULT) {
                //only convert checked exceptions with this
                //otherwise delegate down to the normal protocol specific stuff
                super.handleMessage(message);
            }
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

        Exchange ex = message.getExchange();
        if (ex.get("org.apache.cxf.management.counter.enabled") != null) {
            if (ex.isOneWay()) {
                // do nothing, done by the ResponseTimeInvokerInterceptor
            } else {
                FaultMode faultMode = message.get(FaultMode.class);
                if (faultMode == null) {
                    // client side exceptions don't have FaultMode set un the message properties (as of 2.1.4)
                    faultMode = FaultMode.RUNTIME_FAULT;
                }
                ex.put(FaultMode.class, faultMode);
View Full Code Here

   
    @Override
    public void handleFault(Message message) {    
        Exchange ex = message.getExchange();
        if (Boolean.TRUE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"))) {
            FaultMode mode = message.get(FaultMode.class);
            if (mode == null) {
                mode = FaultMode.UNCHECKED_APPLICATION_FAULT;
            }
            ex.put(FaultMode.class, mode);
        }
View Full Code Here

        } else {
            handlingTime = mhtr.getHandlingTime();
        }
        write.lock();
        try {
            FaultMode faultMode = mhtr.getFaultMode();

            invocations.getAndIncrement();
            if (null == faultMode) {
                // no exception occured
            } else {
View Full Code Here

            if (isOutboundObserver()) {
                Exception ex = message.getContent(Exception.class);
                if (!(ex instanceof Fault)) {
                    ex = new Fault(ex);
                }
                FaultMode mode = (FaultMode)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

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.