Problem with calling Thor API in Portlet code - Websphere

This is a discussion on Problem with calling Thor API in Portlet code - Websphere ; Hi There, I develop portlet using Thor API to create and update user information that deploy on IBM WebSphere Portal 5.1 but I faced the problem with communicating with OIM server. The problem in detail is OIM server cannot recognize ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Problem with calling Thor API in Portlet code

  1. Problem with calling Thor API in Portlet code

    Hi There,



    I develop portlet using Thor API to create and update user information that deploy on IBM WebSphere Portal 5.1 but I faced the problem with communicating with OIM server. The problem in detail is OIM server cannot recognize username and password that was sent from WebSphere Portal while with the same code but running as Standalone JVM or deploy on JBoss it seems to be working fine. If anybody has faced problem before, please point me how to bypass it.



    + Exception I met:

    Thor.API.Exceptions.tcUserAccountInvalidException



    + Herein the OIM server Information:


    • JBoss 4.0.3

    • OIM 9.0.2

    • WebSphere is using jboss-client.jar and some thor.api.* classes.


    + Here in the code snippet on WebSphere



    System.setProperty("XL.HomeDir", "D:\\Testing\\Working\\OIM\\oimclient
    xlclient");


    System.setProperty("java.security.policy", "D:\\Testing\\Working\\OIM\\oimclient\\xlclient\\co nfig
    xl.policy");


    System.setProperty("log4j.configuration", "D:\\Testing\\Working\\OIM\\oimclient\\xlclient\\co nfig
    log.properties");


    System.setProperty("java.security.auth.login.config", "D:\\Testing\\Working\\OIM\\oimclient\\xlclient\\co nfig
    auth.conf");




    ConfigurationClient.ComplexSetting config =

    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");

    final Hashtable env = config.getAllSettings();

    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env, "admin", "amin");



    Hashtable attrs = new Hashtable( );

    attrs.put( "Users.User ID", "TTESTE0");

    attrs.put( "Users.First Name", "TestEX");

    attrs.put( "Users.Last Name", "TestEX");

    attrs.put( "Organizations.Key", "1");

    attrs.put( "Users.Xellerate Type", "End-User");

    attrs.put( "Users.Role", "Full-Time");

    attrs.put( "Users.Password", "welcome");

    tcUserOperationsIntf moUserUtility =

    (tcUserOperationsIntf)ioUtilityFactory.getUtility ( "Thor.API.Operations.tcUserOperationsIntf" );

    long userKey = moUserUtility.createUser( attrs );

    System.out.println( "user key = " + userKey );



    I think the problem may come from WebSphere Portal try to use its self engine or javax classes to format the hand-shacking message. But I am not really sure how to fix it.



    Any comments are highly appreciate.



    Thanks and Best regards,

  2. Re: Problem with calling Thor API in Portlet code

    You have to change below

    System.setProperty("java.security.auth.login.config", "D:\\Testing\\Working\\OIM\\oimclient\\xlclient\\co nfig
    authWS.conf");

    Regards,
    Surinder

+ Reply to Thread