Package org.globus.wsrf.utils

Examples of org.globus.wsrf.utils.FaultHelper


                              String type,
                              BaseClient client) {

        String description = null;
        if (t != null) {
            FaultHelper helper = new FaultHelper(FaultHelper.toBaseFault(t));
            description = helper.getDescriptionAsString();
        }

        if (description == null || description.trim().equals("")) {
            description = recurseCauses(t, "");
        } else {
View Full Code Here


                                          Throwable t) {

        BaseFaultType fault = null;
        try {
            fault = (BaseFaultType) faultClass.newInstance();
            final FaultHelper faultHelper = new FaultHelper(fault);
            if (errMsg != null) {
                faultHelper.addDescription(errMsg);
            }

            if (t != null) {
                final BaseFaultType faultCause;
                if (t instanceof BaseFaultType) {
                    faultCause = (BaseFaultType) t;
                } else {
                    faultCause = FaultHelper.toBaseFault(t);
                }
                faultHelper.addFaultCause(faultCause);
            }

        } catch (Exception e) {
            if (logger.isDebugEnabled()) {
                logger.error(e.getMessage(), e);
View Full Code Here

        if (e == null) {
            return null;
        }

        final FaultHelper helper = new FaultHelper(e);
        final String[] descriptions = helper.getDescription();

        if (descriptions == null || descriptions.length == 0) {

            // Decided that anything recursing into BaseFaultType causes for
            // strings via #getCause(), such as #recurseForSomeString(), is
View Full Code Here

    static void die(Exception e,
                    String type,
                    boolean debug) {

        FaultHelper helper = null;
        if (e != null) {
            helper = new FaultHelper(FaultHelper.toBaseFault(e));
        } else {
            System.err.println("Error, but no exception");
        }

        if (helper != null) {
            if (debug) {
                System.err.println("\n------\nError:\n------\n");
                System.err.println(type + ":\n" +
                        helper.getDescriptionAsString() + "\n");
                System.err.println("\n-----------\nStacktrace:\n-----------\n");
                FaultHelper.printStackTrace(e);
            } else {
                System.err.println("\n------\nError:\n------\n");
                System.err.println();
                System.err.println(type + ":\n" +
                        helper.getDescriptionAsString() + "\n");
            }
        }
        System.exit(APPLICATION_ERROR);
    }
View Full Code Here

                                          Throwable t) {

        BaseFaultType fault = null;
        try {
            fault = (BaseFaultType) faultClass.newInstance();
            final FaultHelper faultHelper = new FaultHelper(fault);
            if (errMsg != null) {
                faultHelper.addDescription(errMsg);
            }

            if (t != null) {
                final BaseFaultType faultCause;
                if (t instanceof BaseFaultType) {
                    faultCause = (BaseFaultType) t;
                } else {
                    faultCause = FaultHelper.toBaseFault(t);
                }
                faultHelper.addFaultCause(faultCause);
            }

        } catch (Exception e) {
            if (logger.isDebugEnabled()) {
                logger.error(e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.globus.wsrf.utils.FaultHelper

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.