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.CFAsteriskXMsgClientTldTable.java

public void createTld(CFSecurityAuthorization Authorization, CFInternetTldBuff Buff) {
    final String S_ProcName = "createTld";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgTldMessageFormatter.formatTldRqstCreate("\n\t\t\t", Buff) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//w  ww. j av  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) {
        ICFAsteriskTldObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskTldObj) {
            realized = (ICFAsteriskTldObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskTldObj");
        }
        if (realized != null) {
            Buff.set(realized.getTldBuff());
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getLastObjectProcessed()");
    }
}

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

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

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

public CFInternetTldBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
        long argTldId) {
    final String S_ProcName = "readDerivedByIdIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgTldMessageFormatter.formatTldRqstReadByIdIdx("\n\t\t\t", argTenantId, argTldId)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from ww 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;
    }
    CFInternetTldBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskTldObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskTldObj) {
            realized = (ICFAsteriskTldObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskTldObj");
        }
        if (realized != null) {
            buff = realized.getTldBuff();
        }
    }
    return (buff);
}

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

public CFInternetTldBuff[] readDerivedByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgTldMessageFormatter.formatTldRqstReadByTenantIdx("\n\t\t\t", argTenantId) + "\n"
            + CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*w  w w. j  a va 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<ICFInternetTldObj> sortedList = (List<ICFInternetTldObj>) sortedListObj;
    int sz = sortedList.size();
    CFInternetTldBuff arr[] = new CFInternetTldBuff[sz];
    Iterator<ICFInternetTldObj> iter = sortedList.iterator();
    ICFInternetTldObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFInternetTldObj) iter.next();
        arr[idx] = cur.getTldBuff();
    }
    return (arr);
}

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

public CFInternetTldBuff readDerivedByNameIdx(CFSecurityAuthorization Authorization, long argTenantId,
        String argName) {/*from   ww w.j ava2s .com*/
    final String S_ProcName = "readDerivedByNameIdx";
    String rqst = CFAsteriskXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAsteriskXMsgTldMessageFormatter.formatTldRqstReadByNameIdx("\n\t\t\t", argTenantId, argName)
            + "\n" + CFAsteriskXMsgSchemaMessageFormatter.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;
    }
    CFInternetTldBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFAsteriskTldObj realized = null;
        if (lastObjectProcessed instanceof ICFAsteriskTldObj) {
            realized = (ICFAsteriskTldObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFAsteriskTldObj");
        }
        if (realized != null) {
            buff = realized.getTldBuff();
        }
    }
    return (buff);
}

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

public void deleteSecGroup(CFSecurityAuthorization Authorization, CFSecuritySecGroupBuff Buff) {
    final String S_ProcName = "deleteSecGroup";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgSecGroupMessageFormatter.formatSecGroupRqstDelete("\n\t\t\t", Buff) + "\n"
            + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*from ww w  .  j a  v a2s. 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;
    }
    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.cffreeswitch.v2_4.CFFreeSwitchXMsgClient.CFFreeSwitchXMsgClientTldTable.java

public void createTld(CFSecurityAuthorization Authorization, CFInternetTldBuff Buff) {
    final String S_ProcName = "createTld";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgTldMessageFormatter.formatTldRqstCreate("\n\t\t\t", Buff) + "\n"
            + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from ww w .  j a  v a2s. 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) {
        ICFFreeSwitchTldObj realized = null;
        if (lastObjectProcessed instanceof ICFFreeSwitchTldObj) {
            realized = (ICFFreeSwitchTldObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchTldObj");
        }
        if (realized != null) {
            Buff.set(realized.getTldBuff());
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getLastObjectProcessed()");
    }
}

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

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

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

public CFInternetTldBuff readDerivedByIdIdx(CFSecurityAuthorization Authorization, long argTenantId,
        long argTldId) {
    final String S_ProcName = "readDerivedByIdIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgTldMessageFormatter.formatTldRqstReadByIdIdx("\n\t\t\t", argTenantId, argTldId)
            + "\n" + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {//from  w w  w. j  a  v a2  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;
    }
    CFInternetTldBuff buff = null;
    Object lastObjectProcessed = responseHandler.getLastObjectProcessed();
    if (lastObjectProcessed != null) {
        ICFFreeSwitchTldObj realized = null;
        if (lastObjectProcessed instanceof ICFFreeSwitchTldObj) {
            realized = (ICFFreeSwitchTldObj) lastObjectProcessed;
        } else {
            throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), S_ProcName,
                    "lastObjectProcessed", lastObjectProcessed, "ICFFreeSwitchTldObj");
        }
        if (realized != null) {
            buff = realized.getTldBuff();
        }
    }
    return (buff);
}

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

public CFInternetTldBuff[] readDerivedByTenantIdx(CFSecurityAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFFreeSwitchXMsgTldMessageFormatter.formatTldRqstReadByTenantIdx("\n\t\t\t", argTenantId) + "\n"
            + CFFreeSwitchXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    try {/*  w w  w.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;
    }
    Object sortedListObj = responseHandler.getListOfObjects();
    if (sortedListObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getListOfObjects");
    }
    @SuppressWarnings("unchecked")
    List<ICFInternetTldObj> sortedList = (List<ICFInternetTldObj>) sortedListObj;
    int sz = sortedList.size();
    CFInternetTldBuff arr[] = new CFInternetTldBuff[sz];
    Iterator<ICFInternetTldObj> iter = sortedList.iterator();
    ICFInternetTldObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFInternetTldObj) iter.next();
        arr[idx] = cur.getTldBuff();
    }
    return (arr);
}