Example usage for javax.crypto BadPaddingException getMessage

List of usage examples for javax.crypto BadPaddingException getMessage

Introduction

In this page you can find the example usage for javax.crypto BadPaddingException getMessage.

Prototype

public String getMessage() 

Source Link

Document

Returns the detail message string of this throwable.

Usage

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientURLProtocolTable.java

public CFInternetURLProtocolBuff readDerivedByUNameIdx(CFSecurityAuthorization Authorization, String argName) {
    final String S_ProcName = "readDerivedByUNameIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgURLProtocolMessageFormatter.formatURLProtocolRqstReadByUNameIdx("\n\t\t\t", argName)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*from w w w .  j ava  2s .  c o  m*/
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFInternetURLProtocolBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskURLProtocolObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskURLProtocolObj) {
            realized = (ICFAsteriskURLProtocolObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskURLProtocolObj");
        }
        if (realized != null) {
            buff = realized.getURLProtocolBuff();
        }
    }
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientSecGroupTable.java

public CFSecuritySecGroupBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argClusterId,
        int argSecGroupId) {
    final String S_ProcName = "readDerivedByIdIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFFreeSwitchXMsgSecGroupMessageFormatter.formatSecGroupRqstReadByIdIdx("\n\t\t\t",
                    argClusterId, argSecGroupId)
            + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from   w  w  w .  j  a v  a2  s. c  o m
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFSecuritySecGroupBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFFreeSwitchSecGroupObj realized = null;
        if (lastObjectProcessed instanceof ICFFreeSwitchSecGroupObj) {
            realized = (ICFFreeSwitchSecGroupObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchSecGroupObj");
        }
        if (realized != null) {
            buff = realized.getSecGroupBuff();
        }
    }
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientSecGroupTable.java

public CFSecuritySecGroupBuff readDerivedByUNameIdx(CFSecurityAuthorization Authorization, long argClusterId,
        String argName) {//w  w  w .  j  ava  2  s  .  com
    final String S_ProcName = "readDerivedByUNameIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgSecGroupMessageFormatter.formatSecGroupRqstReadByUNameIdx("\n\t\t\t",
                    argClusterId, argName)
            + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFSecuritySecGroupBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFFreeSwitchSecGroupObj realized = null;
        if (lastObjectProcessed instanceof ICFFreeSwitchSecGroupObj) {
            realized = (ICFFreeSwitchSecGroupObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchSecGroupObj");
        }
        if (realized != null) {
            buff = realized.getSecGroupBuff();
        }
    }
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientSecGroupTable.java

public void updateSecGroup(CFSecurityAuthorization Authorization, CFSecuritySecGroupBuff Buff) {
    final String S_ProcName = "updateSecGroup";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgSecGroupMessageFormatter.formatSecGroupRqstUpdate("\n\t\t\t", Buff) + "\n"
            + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//  www.  j av a  2 s  .c om
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFSecuritySecGroupBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFFreeSwitchSecGroupObj realized = null;
        if (lastObjectProcessed instanceof ICFFreeSwitchSecGroupObj) {
            realized = (ICFFreeSwitchSecGroupObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchSecGroupObj");
        }
        if (realized != null) {
            buff = realized.getSecGroupBuff();
        }
    }
    if (buff != null) {
        Buff.set(buff);
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientSecGroupTable.java

public CFSecuritySecGroupBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization,
        long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAsteriskXMsgSecGroupMessageFormatter
                    .formatSecGroupRqstReadByClusterIdx("\n\t\t\t", argClusterId)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from  w  w w .  jav  a 2s. co  m
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFSecuritySecGroupObj> sortedList = (List<ICFSecuritySecGroupObj>) sortedListObj;
    int sz = sortedList.size();
    CFSecuritySecGroupBuff arr[] = new CFSecuritySecGroupBuff[sz];
    Iterator<ICFSecuritySecGroupObj> iter = sortedList.iterator();
    ICFSecuritySecGroupObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFSecuritySecGroupObj) iter.next();
        arr[idx] = cur.getSecGroupBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientURLProtocolTable.java

public void createURLProtocol(CFSecurityAuthorization Authorization, CFInternetURLProtocolBuff Buff) {
    final String S_ProcName = "createURLProtocol";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgURLProtocolMessageFormatter.formatURLProtocolRqstCreate("\n\t\t\t", Buff) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from   w  w w . j a va2  s .  c  om
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskURLProtocolObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskURLProtocolObj) {
            realized = (ICFAsteriskURLProtocolObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskURLProtocolObj");
        }
        if (realized != null) {
            Buff.set(realized.getURLProtocolBuff());
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getLastObjectProcessed()");
    }
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientURLProtocolTable.java

public CFInternetURLProtocolBuff readDerived(CFSecurityAuthorization Authorization,
        CFInternetURLProtocolPKey PKey) {
    final String S_ProcName = "readDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgURLProtocolMessageFormatter.formatURLProtocolRqstRead("\n\t\t\t", PKey) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//  w  ww  .  j  a v a  2  s  .c  o  m
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFInternetURLProtocolBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskURLProtocolObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskURLProtocolObj) {
            realized = (ICFAsteriskURLProtocolObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskURLProtocolObj");
        }
        if (realized != null) {
            buff = realized.getURLProtocolBuff();
        }
    }
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientURLProtocolTable.java

public CFInternetURLProtocolBuff lockDerived(CFSecurityAuthorization Authorization,
        CFInternetURLProtocolPKey PKey) {
    final String S_ProcName = "lockDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgURLProtocolMessageFormatter.formatURLProtocolRqstLock("\n\t\t\t", PKey) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from w w w. ja va  2s . com
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    CFInternetURLProtocolBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskURLProtocolObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskURLProtocolObj) {
            realized = (ICFAsteriskURLProtocolObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskURLProtocolObj");
        }
        if (realized != null) {
            buff = realized.getURLProtocolBuff();
        }
    }
    return (buff);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_4.CFAsteriskXMsgClient.CFAsteriskXMsgClientURLProtocolTable.java

public CFInternetURLProtocolBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgURLProtocolMessageFormatter.formatURLProtocolRqstReadAll("\n\t\t\t") + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {// ww w. jav a  2 s . co m
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFInternetURLProtocolObj> sortedList = (List<ICFInternetURLProtocolObj>) sortedListObj;
    int sz = sortedList.size();
    CFInternetURLProtocolBuff arr[] = new CFInternetURLProtocolBuff[sz];
    Iterator<ICFInternetURLProtocolObj> iter = sortedList.iterator();
    ICFInternetURLProtocolObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFInternetURLProtocolObj) iter.next();
        arr[idx] = cur.getURLProtocolBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientSecGroupTable.java

public CFSecuritySecGroupBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization,
        long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFFreeSwitchXMsgSecGroupMessageFormatter
                    .formatSecGroupRqstReadByClusterIdx("\n\t\t\t", argClusterId)
            + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*from  w ww  .  ja  va2 s  .co m*/
        schema.getCFTipClientHandler().issueAppRequest(rqst);
    } catch (BadPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught BadPaddingException - " + e.getMessage(), e);
    } catch (IllegalBlockSizeException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught IllegalBlockSizeException - " + e.getMessage(), e);
    } catch (InvalidKeyException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidKeyException - " + e.getMessage(), e);
    } catch (NoSuchAlgorithmException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchAlgorithmException - " + e.getMessage(), e);
    } catch (InvalidAlgorithmParameterException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught InvalidAlgorithmParameterException - " + e.getMessage(), e);
    } catch (NoSuchPaddingException e) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Caught NoSuchPaddingException - " + e.getMessage(), e);
    }
    ICFTipResponseHandler responseHandler = schema.getCFTipClientHandler().getResponseHandler();
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFSecuritySecGroupObj> sortedList = (List<ICFSecuritySecGroupObj>) sortedListObj;
    int sz = sortedList.size();
    CFSecuritySecGroupBuff arr[] = new CFSecuritySecGroupBuff[sz];
    Iterator<ICFSecuritySecGroupObj> iter = sortedList.iterator();
    ICFSecuritySecGroupObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFSecuritySecGroupObj) iter.next();
        arr[idx] = cur.getSecGroupBuff();
    }
    return (arr);
}