public void write(IDPSSODescriptorType idpSSODescriptor) throws ProcessingException { if (idpSSODescriptor == null) throw new ProcessingException(logger.nullArgumentError("IDPSSODescriptorType")); StaxUtil.writeStartElement( writer, METADATA_PREFIX, JBossSAMLConstants.IDP_SSO_DESCRIPTOR.get(), METADATA_NSURI.get()); Boolean wantsAuthnRequestsSigned = idpSSODescriptor.isWantAuthnRequestsSigned(); if (wantsAuthnRequestsSigned != null) { StaxUtil.writeAttribute( writer, new QName(JBossSAMLConstants.WANT_AUTHN_REQUESTS_SIGNED.get()), wantsAuthnRequestsSigned.toString()); } writeProtocolSupportEnumeration(idpSSODescriptor.getProtocolSupportEnumeration()); List<IndexedEndpointType> artifactResolutionServices = idpSSODescriptor.getArtifactResolutionService(); for (IndexedEndpointType indexedEndpoint : artifactResolutionServices) { writeArtifactResolutionService(indexedEndpoint); } List<EndpointType> sloServices = idpSSODescriptor.getSingleLogoutService(); for (EndpointType endpoint : sloServices) { writeSingleLogoutService(endpoint); } List<EndpointType> ssoServices = idpSSODescriptor.getSingleSignOnService(); for (EndpointType endpoint : ssoServices) { writeSingleSignOnService(endpoint); } List<String> nameIDFormats = idpSSODescriptor.getNameIDFormat(); for (String nameIDFormat : nameIDFormats) { writeNameIDFormat(nameIDFormat); } List<AttributeType> attributes = idpSSODescriptor.getAttribute(); for (AttributeType attribType : attributes) { write(attribType); } StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }