anchor.diff:  ~ specific language governing permissions and limitations
   ~ under the License.
   -->
  -<%@page import="org.apache.axis2.context.ConfigurationContext"%>
  +<%@page import="org.apache.axis2.context.ConfigurationContext" %>
   <%@ page import="org.apache.commons.lang.StringUtils" %>
   <%@ page import="org.wso2.carbon.CarbonConstants" %>
   <%@ page import="org.wso2.carbon.identity.sso.saml.stub.types.SAMLSSOServiceProviderDTO" %>
  
positive.code:         client = new SAMLSSOConfigServiceClient(cookie, backendServerURL, configContext);
  
          serviceProviderDTO = new SAMLSSOServiceProviderDTO();
          boolean isEditingSP = false; 
          if ("editServiceProvider".equals(SAMLSSOUIUtil.getSafeInput(request, "SPAction"))) {
              isEditingSP = true;
              serviceProviderDTO.setIssuer(SAMLSSOUIUtil.getSafeInput(request, "hiddenIssuer"));
  
negative.code:         samlSsoServuceProviderConfigBean.clearBean();
  
          String message;
          if (status) {
              if (isEditingSP) {
                  message = resourceBundle.getString("sp.updated.successfully");
              } else {
                  message = resourceBundle.getString("sp.added.successfully");
              }
          } else {
              message = resourceBundle.getString("error.adding.sp");
          }
  
          if (status) {
              CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.INFO, request);
          } else {
              CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.ERROR, request);
          }
  %>
  <script>
      <%
      boolean applicationComponentFound = CarbonUIUtil.isContextRegistered(config, "/application/");
  
      if (applicationComponentFound) {
          if (status) {
      %>
      location.href = '../application/configure-service-provider.jsp?action=update&display=samlIssuer&spName=<%=spName%>&samlIssuer=<%=serviceProviderDTO.getIssuer()%>&attrConServIndex=<%=attributeConsumingServiceIndex%>';
      <% } else { %>
      location.href = '../application/configure-service-provider.jsp?action=delete&display=samlIssuer&spName=<%=spName%>&samlIssuer=<%=serviceProviderDTO.getIssuer()%>&attrConServIndex=<%=attributeConsumingServiceIndex%>';
  
      <% } } else { %>
      location.href = 'manage_service_providers.jsp?region=region1&item=manage_saml_sso';
      <% } %>
  </script>
  <%
  
  