if (!locateResultType.getUnverifiedKeyBinding().iterator().hasNext()) {
throw new XKMSNotFoundException(
"X509Certificate is not found for id: " + ids);
}
KeyInfoType keyInfo = locateResultType.getUnverifiedKeyBinding()
.iterator().next().getKeyInfo();
if (!keyInfo.getContent().iterator().hasNext()) {
throw new XKMSNotFoundException(
"X509Certificate is not found for id: " + ids);
}
JAXBElement<X509DataType> x509Data = (JAXBElement<X509DataType>)keyInfo
.getContent().iterator().next();
JAXBElement<byte[]> certificate = (JAXBElement<byte[]>)x509Data
.getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName()
.iterator().next();