Iterator iter = cainfo.getExtendedCAServiceInfos().iterator(); while(iter.hasNext()){ ExtendedCAServiceInfo next = (ExtendedCAServiceInfo) iter.next(); if(next instanceof OCSPCAServiceInfo){ List ocspcert = ((OCSPCAServiceInfo) next).getOCSPSignerCertificatePath(); signsession.publishCACertificate(administrator, ocspcert, publishers, CertificateDataBean.CERTTYPE_ENDENTITY); } if(next instanceof XKMSCAServiceInfo){ List xkmscert = ((XKMSCAServiceInfo) next).getXKMSSignerCertificatePath(); signsession.publishCACertificate(administrator, xkmscert, publishers, CertificateDataBean.CERTTYPE_ENDENTITY); } if(next instanceof CmsCAServiceInfo){ List cmscert = ((CmsCAServiceInfo) next).getCertificatePath(); signsession.publishCACertificate(administrator, cmscert, publishers, CertificateDataBean.CERTTYPE_ENDENTITY); } }
 public void publishCA(int caid){ 	CAInfo cainfo = caadminsession.getCAInfo(administrator, caid); 	CertificateProfile certprofile = certificatesession.getCertificateProfile(administrator, cainfo.getCertificateProfileId()); 	int certtype = CertificateDataBean.CERTTYPE_SUBCA; 	if(cainfo.getSignedBy() == CAInfo.SELFSIGNED) 	  certtype = CertificateDataBean.CERTTYPE_ROOTCA; 	// A CA certificate is published where the CRL is published and if there is a publisher noted in the certificate profile  	// (which there is probably not)  	Collection publishers = cainfo.getCRLPublishers(); 	publishers.addAll(certprofile.getPublisherList()); 	signsession.publishCACertificate(administrator, cainfo.getCertificateChain(), publishers, certtype); }