X509Certificate[] arr = new X509Certificate[1];
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("keystore.jks");
KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType());
ks.load(is, "password".toCharArray());
arr[0] = (X509Certificate)ks.getCertificate("issuercert");
Document oDoc = new DocumentImpl();
KeyInfo oKeyInfo = new KeyInfo(oDoc);
X509Data oData = new X509Data(oDoc);
oData.addCertificate(arr[0]);
oKeyInfo.add(oData);
srv.setKeyInfo(oKeyInfo);