IndexedEndpointType sloRedirectEndpoint = metaDataFactory.createIndexedEndpointType();
sloRedirectEndpoint.setBinding(SamlConstants.HTTP_REDIRECT_BINDING);
sloRedirectEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_SINGLE_LOGOUT_SERVICE));
IndexedEndpointType sloPostEndpoint = metaDataFactory.createIndexedEndpointType();
sloPostEndpoint.setBinding(SamlConstants.HTTP_POST_BINDING);
sloPostEndpoint.setLocation(getServiceURL(SamlServiceType.SAML_SINGLE_LOGOUT_SERVICE));
ssoDescriptor.getSingleLogoutService().add(sloRedirectEndpoint);
ssoDescriptor.getSingleLogoutService().add(sloPostEndpoint);