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.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientTSecGroupTable.java

public void deleteTSecGroupByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
        int argTSecGroupId) {
    final String S_ProcName = "deleteTSecGroupByIdIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgTSecGroupMessageFormatter.formatTSecGroupRqstDeleteByIdIdx("\n\t\t\t",
                    argTenantId, argTSecGroupId)
            + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from w  w w .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;
    }
    boolean deleted = responseHandler.getDeleted();
    if (!deleted) {
        throw CFLib.getDefaultExceptionFactory().newRuntimeException(getClass(), S_ProcName,
                "Server did not respond with a Deleted message");
    }
}

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

public CFSecuritySecAppBuff readDerived(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
    final String S_ProcName = "readDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstRead("\n\t\t\t", PKey) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from w  ww.java 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;
    }
    CFSecuritySecAppBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            buff = realized.getSecAppBuff();
        }
    }
    return (buff);
}

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

public CFSecuritySecAppBuff lockDerived(CFSecurityAuthorization Authorization, CFSecuritySecAppPKey PKey) {
    final String S_ProcName = "lockDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstLock("\n\t\t\t", PKey) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/* w  w  w. j a 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;
    }
    CFSecuritySecAppBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            buff = realized.getSecAppBuff();
        }
    }
    return (buff);
}

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

public void createSecApp(CFSecurityAuthorization Authorization, CFSecuritySecAppBuff Buff) {
    final String S_ProcName = "createSecApp";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstCreate("\n\t\t\t", Buff) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.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;
    }
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            Buff.set(realized.getSecAppBuff());
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getLastObjectProcessed()");
    }
}

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

public CFSecuritySecAppBuff[] readAllDerived(CFSecurityAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadAll("\n\t\t\t") + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//  w w w  .ja 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;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFSecuritySecAppObj> sortedList = (List<ICFSecuritySecAppObj>) sortedListObj;
    int sz = sortedList.size();
    CFSecuritySecAppBuff arr[] = new CFSecuritySecAppBuff[sz];
    Iterator<ICFSecuritySecAppObj> iter = sortedList.iterator();
    ICFSecuritySecAppObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFSecuritySecAppObj) iter.next();
        arr[idx] = cur.getSecAppBuff();
    }
    return (arr);
}

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

public CFSecuritySecAppBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argClusterId,
        int argSecAppId) {
    final String S_ProcName = "readDerivedByIdIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByIdIdx("\n\t\t\t",
                    argClusterId, argSecAppId)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from ww  w .  j av  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;
    }
    CFSecuritySecAppBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            buff = realized.getSecAppBuff();
        }
    }
    return (buff);
}

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

public CFSecuritySecAppBuff[] readDerivedByClusterIdx(CFSecurityAuthorization Authorization,
        long argClusterId) {
    final String S_ProcName = "readDerivedByClusterIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByClusterIdx("\n\t\t\t", argClusterId)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*from  w w w .  jav  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;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFSecuritySecAppObj> sortedList = (List<ICFSecuritySecAppObj>) sortedListObj;
    int sz = sortedList.size();
    CFSecuritySecAppBuff arr[] = new CFSecuritySecAppBuff[sz];
    Iterator<ICFSecuritySecAppObj> iter = sortedList.iterator();
    ICFSecuritySecAppObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFSecuritySecAppObj) iter.next();
        arr[idx] = cur.getSecAppBuff();
    }
    return (arr);
}

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

public CFSecuritySecAppBuff readDerivedByUJEEMountIdx(CFSecurityAuthorization Authorization, long argClusterId,
        String argJEEMountName) {
    final String S_ProcName = "readDerivedByUJEEMountIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstReadByUJEEMountIdx("\n\t\t\t",
                    argClusterId, argJEEMountName)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {// w w  w.ja v  a  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;
    }
    CFSecuritySecAppBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            buff = realized.getSecAppBuff();
        }
    }
    return (buff);
}

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

public void updateSecApp(CFSecurityAuthorization Authorization, CFSecuritySecAppBuff Buff) {
    final String S_ProcName = "updateSecApp";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecAppMessageFormatter.formatSecAppRqstUpdate("\n\t\t\t", Buff) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from   w ww.  j a  v 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;
    }
    CFSecuritySecAppBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecAppObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecAppObj) {
            realized = (ICFAsteriskSecAppObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecAppObj");
        }
        if (realized != null) {
            buff = realized.getSecAppBuff();
        }
    }
    if (buff != null) {
        Buff.set(buff);
    }
}

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

public CFSecuritySecGroupBuff readDerived(CFSecurityAuthorization Authorization, CFSecuritySecGroupPKey PKey) {
    final String S_ProcName = "readDerived";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgSecGroupMessageFormatter.formatSecGroupRqstRead("\n\t\t\t", PKey) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from  ww w. j  a 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;
    }
    CFSecuritySecGroupBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskSecGroupObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskSecGroupObj) {
            realized = (ICFAsteriskSecGroupObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskSecGroupObj");
        }
        if (realized != null) {
            buff = realized.getSecGroupBuff();
        }
    }
    return (buff);
}