// handleException("PaypalMediator with a credentials element that has no ns-prifix attribute, "
// +
// "but it is required to have the ns-prifix attribute for credentials");
// }
RequestCredential credential = new RequestCredential();
// credential.setNamespace(requestCredentialElement
// .getAttributeValue(ATT_NAMESPACE));
// credential.setNamespacePrefix(requestCredentialElement
// .getAttributeValue(ATT_NAMESPACE_PREFIX));
credential.setUsernameXPath(getXPath(requestCredentialElement,
Q_USERNAME, true));
credential.setUsernameValue(getValue(requestCredentialElement,
Q_USERNAME, true));
credential.setPasswordXPath(getXPath(requestCredentialElement,
Q_PASSWORD, true));
credential.setPasswordValue(getValue(requestCredentialElement,
Q_PASSWORD, true));
credential.setAuthTokenXPath(getXPath(requestCredentialElement,
Q_AUTH_TOKEN, false));
credential.setAuthTokenXPath(getXPath(requestCredentialElement,
Q_AUTH_TOKEN, false));
credential.setHardExpirationValue(getValue(requestCredentialElement,
Q_HARD_EXP_WARN, false));
credential.setHardExpirationXPath(getXPath(requestCredentialElement,
Q_HARD_EXP_WARN, false));
credential.setAppIdXPath(getXPath(requestCredentialElement, Q_APP_ID,
false));
credential.setAppIdValue(getValue(requestCredentialElement, Q_APP_ID,
false));
credential.setDevIdXPath(getXPath(requestCredentialElement, Q_DEV_ID,
false));
credential.setDevIdValue(getValue(requestCredentialElement, Q_DEV_ID,
false));
credential.setAuthCertXPath(getXPath(requestCredentialElement,
Q_AUTH_CERT, false));
credential.setAuthCertValue(getValue(requestCredentialElement,
Q_AUTH_CERT, false));
credential.setSignatureXPath(getXPath(requestCredentialElement,
Q_SIGNATURE, false));
credential.setSignatureValue(getValue(requestCredentialElement,
Q_SIGNATURE, false));
credential.setSubjectXPath(getXPath(requestCredentialElement,
Q_SUBJECT, false));
credential.setSubjectValue(getValue(requestCredentialElement,
Q_SUBJECT, false));
return credential;
}