private void initCredential() throws MissingCredentialException {
		ConfigManager conf = ConfigManager.getInstance();
		int suffix = 1;
		String prefix = Constants.ACCCOUT_PREFIX;
		Map<String, String> credMap = conf.getValuesByCategory(prefix);
		Set<String> acctSet = conf.getNumOfAcct();
		if (acctSet.size() == 0) {
			throw new MissingCredentialException(
					"No valid API accounts have been configured");
		}
		while (suffix <= acctSet.size()) {
			String userName = (String) credMap.get(prefix + suffix
					+ ".UserName");
			String password = (String) credMap.get(prefix + suffix
					+ ".Password");
			String appId = (String) credMap.get(prefix + suffix + ".AppId");
			if (credMap.get(prefix + suffix + ".Signature") != null) {
				String signature = (String) credMap.get(prefix + suffix
						+ ".Signature");
				credentialMap.put(userName, new SignatureCredential(userName,
						password, signature, appId));
			} else if (credMap.get(prefix + suffix + ".CertPath") != null) {
				String certPath = (String) credMap.get(prefix + suffix
						+ ".CertPath");
				String certKey = (String) credMap.get(prefix + suffix
						+ ".CertKey");
				credentialMap.put(userName, new CertificateCredential(userName,
						password, certPath, certKey, appId));
			}
			if (defaultAcctName == null) {
				defaultAcctName = (String) credMap.get(prefix + suffix
						+ ".UserName");
			}
			suffix++;
		}

	}