protected void writeAttributeValue(final XMLStreamWriter writer, final String uri,
                                       final Object attributeValue,
                                       final WSFederationRegisteredService service) throws Exception {
        LOGGER.trace("Mapping attribute [{}] with value [{}] for service [{}]", uri, attributeValue, service.getServiceId());
        writer.writeStartElement("ic", "ClaimValue", WSFederationConstants.HTTP_SCHEMAS_XMLSOAP_ORG_WS_2005_05_IDENTITY);
        writer.writeAttribute("Uri", uri);
        writer.writeAttribute("Optional", Boolean.TRUE.toString());

        val values = CollectionUtils.toCollection(attributeValue);
        for (val value : values) {
            writer.writeStartElement("ic", "Value", WSFederationConstants.HTTP_SCHEMAS_XMLSOAP_ORG_WS_2005_05_IDENTITY);
            writer.writeCharacters(value.toString());
            writer.writeEndElement();
        }
        writer.writeEndElement();
    }
This is {@link DefaultWSFederationRelyingPartyAttributeWriter}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-ws-idp/src/main/java/org/apereo/cas/ws/idp/services/DefaultWSFederationRelyingPartyAttributeWriter.java