Which IIQ version are you inquiring about?
8.4.2
Please share any images or screenshots, if relevant.
[Please insert images here, otherwise delete this section]
Please share any other relevant files that may be required (for example, logs).
package com.sealedair.servlets;
import sailpoint.object.Identity;
import sailpoint.tools.GeneralException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
public class ValidateIdentityServlet extends HttpServlet {
private static final ObjectMapper mapper = new ObjectMapper();
@Override
SailPointContext context = null;
sendJson(resp, responseMap);
return;
}
boolean emailFound = false;
boolean IDmatch = false;
for (Identity identity : identities) {
String identityEmail = identity.getEmail();
emailFound = true;
ID = true;
}
}
responseMap.put("emailValid", emailFound);
} catch (GeneralException ge) {
responseMap.put("error", "GeneralException: " + ge.getMessage());
} catch (Exception ex) {
responseMap.put("error", "Exception: " + ex.getMessage());
} finally {
if (context != null) {
try {
context.close();
} catch (GeneralException e) {
// Optional: log error
}
}
}
sendJson(resp, responseMap);
}
private void sendJson(HttpServletResponse resp, Map<String, Object> map) throws IOException {
PrintWriter out = resp.getWriter();
out.print(mapper.writeValueAsString(map));
out.flush();
}
}
Share all details about your problem, including any error messages you may have received.
Hi, I have built a servlet based API in IIQ 8.4.2 this is a requirement to validate email and ID attribute from sailpoint and return a response in the API call if attribute is present and ID is matched to the email. I trued many ways with the servlet calling rule or just the servlet its causing memory leak and crashing the sailpoint after the first API call. ANy inputs?