Package org.switchyard.test

Examples of org.switchyard.test.InvocationFaultException


    }

    public static Throwable getCauseFromHandlerException(final Throwable thrown) {
        Throwable cause = thrown;
        if (thrown instanceof InvocationFaultException) {
            final InvocationFaultException faultException = (InvocationFaultException) thrown;
            if (faultException.getCause() instanceof HandlerException) {
                HandlerException handlerEx = (HandlerException)faultException.getCause();
                cause = handlerEx.isWrapper() ? handlerEx.getCause() : handlerEx;
            } else if (faultException.getFaultMessage().getContent() instanceof Exception) {
                cause = faultException.getFaultMessage().getContent(Throwable.class);
            }
        }
        return cause;
    }
View Full Code Here


        serviceDomain.registerServiceReference(controlService.getName(), controlService.getInterface(), controlService.getProviderHandler());
        handler.start();
        new Invoker(serviceDomain, serviceName).operation("process").property(CORRELATION_KEY_PROPERTY, "A").sendInOnly(null);
        new Invoker(serviceDomain, serviceName).operation("process").property(CORRELATION_KEY_PROPERTY, "B").sendInOnly(null);
        new Invoker(serviceDomain, serviceName).operation("signal").property(CORRELATION_KEY_PROPERTY, "A").sendInOnly(null);
        InvocationFaultException fault = null;
        try {
            new Invoker(serviceDomain, serviceName).operation("signal").property(CORRELATION_KEY_PROPERTY, bomb ? "A" : "B").sendInOut(null);
        } catch (InvocationFaultException ife) {
            fault = ife;
        }
View Full Code Here

TOP

Related Classes of org.switchyard.test.InvocationFaultException

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.