Sample Code:
package com.pokuri.oaam;
import java.util.ArrayList;
import java.util.List;
import com.bharosa.vcrypt.auth.intf.*;
import com.bharosa.vcrypt.auth.util.VCryptAuthUtil;
import com.bharosa.vcrypt.common.util.VCryptResponse;
import com.bharosa.vcrypt.customercare.impl.VCryptCCImpl;
import com.bharosa.vcrypt.customercare.impl.VCryptCCSOAPImpl;
import com.bharosa.vcrypt.customercare.util.VCryptCCUtil;
import com.bharosa.vcryptclient.proxy.exception.BharosaProxyException;
import com.bharosa.vcryptclient.proxy.intf.BharosaProxy;
/**
* @author siva pokuri
*
*/
public class ChallengeQuestionsReset
{
public static void main(String[] args)
{
ChallengeQuestionsReset cu = new ChallengeQuestionsReset();
String response = "FAILED";
try
{
response = cu.resetUserProfile("spokuri", "Default");
System.out.println("Response " + response);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("RESPONSE " + response);
}
public String resetUserProfile(String userName, String primaryGroupName)
{
System.out.println("Creating user: " + userName);
try{
VCryptCCSOAPImpl vcc = new VCryptCCSOAPImpl();
VCryptResponse vr = vcc.resetUser(userName);
System.out.println("Message " +vr.getSuccess());
System.out.println("Status code Message " +vr.getResponseCode());
return "SUCCESS";
}
catch (Exception e) {
// TODO: handle exception
}
return "FAILED";
}
}
-- Siva Pokuri.
package com.pokuri.oaam;
import java.util.ArrayList;
import java.util.List;
import com.bharosa.vcrypt.auth.intf.*;
import com.bharosa.vcrypt.auth.util.VCryptAuthUtil;
import com.bharosa.vcrypt.common.util.VCryptResponse;
import com.bharosa.vcrypt.customercare.impl.VCryptCCImpl;
import com.bharosa.vcrypt.customercare.impl.VCryptCCSOAPImpl;
import com.bharosa.vcrypt.customercare.util.VCryptCCUtil;
import com.bharosa.vcryptclient.proxy.exception.BharosaProxyException;
import com.bharosa.vcryptclient.proxy.intf.BharosaProxy;
/**
* @author siva pokuri
*
*/
public class ChallengeQuestionsReset
{
public static void main(String[] args)
{
ChallengeQuestionsReset cu = new ChallengeQuestionsReset();
String response = "FAILED";
try
{
response = cu.resetUserProfile("spokuri", "Default");
System.out.println("Response " + response);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("RESPONSE " + response);
}
public String resetUserProfile(String userName, String primaryGroupName)
{
System.out.println("Creating user: " + userName);
try{
VCryptCCSOAPImpl vcc = new VCryptCCSOAPImpl();
VCryptResponse vr = vcc.resetUser(userName);
System.out.println("Message " +vr.getSuccess());
System.out.println("Status code Message " +vr.getResponseCode());
return "SUCCESS";
}
catch (Exception e) {
// TODO: handle exception
}
return "FAILED";
}
}
Hi,
ReplyDeleteI'm trying out my 1st code wrt OAAM. Don't we need to create session with OAAM to execute this reset operation.
Thanks,
Krishna
No. As I used OAAM customer Care API's.
DeleteThanks
Thank you Siva for your prompt response.
DeleteHi Siva, could you please provide a sample on OAAM Customer Care APIs. Where deploy & how to make calls to that reset functionality provided in this article.
DeletePlease help!
Thanks,
Krishna Mohan
This comment has been removed by the author.
DeleteHi,
DeleteBelow links will help you.
https://docs.oracle.com/cd/E27559_01/apirefs.1112/e27208/toc.htm
https://docs.oracle.com/cd/E29542_01/admin.1111/e14568/web.htm#AAMAD6041
Thanks
Hi Siva,
ReplyDeleteThanks for your response.