Iterator<ExtendedCAServiceInfo> iter = cainfo.getExtendedCAServiceInfos().iterator();
ArrayList<Integer> extendedservicetypes = new ArrayList<Integer>();
while(iter.hasNext()){
ExtendedCAServiceInfo next = iter.next();
if(next instanceof OCSPCAServiceInfo){
setExtendedCAService(new OCSPCAService(next));
extendedservicetypes.add(Integer.valueOf(ExtendedCAServiceInfo.TYPE_OCSPEXTENDEDSERVICE));
}
if(next instanceof XKMSCAServiceInfo){
setExtendedCAService(new XKMSCAService(next));
extendedservicetypes.add(Integer.valueOf(ExtendedCAServiceInfo.TYPE_XKMSEXTENDEDSERVICE));