for (String serviceName : uniqueServiceNames) { XmlTrustAnchor trustAnchor = new XmlTrustAnchor(); trustAnchor.setCountryCode(xmlTrustedServiceProvider.getCountryCode()); trustAnchor.setTrustServiceProvider(xmlTrustedServiceProvider.getTSPName()); trustAnchor.setTrustServiceProviderRegistrationId(xmlTrustedServiceProvider.getTSPRegistrationIdentifier());