public static String getAliasForX509Certificate(X509Certificate cert,
String serviceURL) {
try {
LocateRequest request = createLocateRequest();
request.setServiceURI(serviceURL);
QueryKeyBinding queryKeybinding = createQueryKeyBinding();
queryKeybinding.setCertValue(cert);
queryKeybinding.addUseKeyWith(UseKeyWith.PKIX, cert.getSubjectDN()
.getName());
request.setQueryKeyBinding(queryKeybinding);
request.addRespondWith(RespondWith.KEY_NAME);
OMElement element = getAsOMElement(request);
OMElement result = sendReceive(element, serviceURL);
result = buildElement(result);