Skip to Content

LDAP object..

Hi,

Can anybody explain me what this LDAP Object does? There is a udf existing, which is developed by someone long back...can anybody explain me exactly what this LDAP used for?

String username; String sRes; GISLDAPRead ob; //Query AD for Microsoft Project UserId to Peoplesoft EmployeeID Convert username = sWRESAccount.trim().substring(sWRESAccount.length()-7,sWRESAccount.length()); ob = new GISLDAPRead(); sRes = ob.queryAdUserID("ldapquery", username, ); if ((sRes.contains(":")) && (sRes.contains("}"))) sRes = sRes.substring(sRes.indexOf(':')+2,sRes.indexOf('}')).trim(); return sRes;

Thank you,

Vijay

Add comment
10|10000 characters needed characters exceeded

  • Hi Vijay,

    Can you check if there is any archives imported in the message mapping that is being referenced here?

    I don't think about code will directly set up a connection to LDAP. It must be accessing some API.

    Regards,

    Sanjeev

  • Vijay B Sanjeev Shekhar Singh

    Thanks Sanjeev. Yes there is an imported archive...so in this code, exactly from where the LDAP is pulling the information from..and if I want to look at that information..then where do i have to look.

  • Get RSS Feed

6 Answers

  • Oct 18, 2016 at 02:48 PM

    Hello Vijay,

    LDAP in Java is used to access directories.

    In this case As per my knowledge your accessing some microsoft directory

    http://www.javaworld.com/article/2076073/java-web-development/ldap-and-jndi--together-forever.html

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 18, 2016 at 02:52 PM

    Thanks Raghu..Where do we have to mention the connection details for LDAP?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 19, 2016 at 03:35 AM

    Hello Vijay,

    What is the scenario and where your using it?

    AFAIK in this UDF it is passed as query-ldapquery

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 19, 2016 at 12:39 PM

    Its JDBC to SOAP interface

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2016 at 03:28 PM

    Thanks Sanjeev. Yes there is an imported archive...so in this code, exactly from where the LDAP is pulling the information from..and if I want to look at that information..then where do i have to look.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 20, 2016 at 10:58 PM

    Hi Vijay,

    Assuming that sWRESAccount is an input to the UDF, I think what this code is doing is to get the username and then pass it to the queryAdUserID method:

    sRes = ob.queryAdUserID("ldapquery", username, );

    So, I would suggest to check in the imported archive for a method queryAdUserID. That code should have the connection details to LDAP, if javax has been used to establish the connection. Refer to the link that Raghu has provided earlier for the javax related code to connect to LDAP.

    Else, there is a standard SAP API to retrieve information from LDAP (provided SAP PI is connected to it, you should be able to see user details in NWA identity management). SAP Java docs link:

    http://help.sap.com/javadocs/nw04s/sps09/se/com/sap/security/api/IUserFactory.html

    Regards,

    Sanjeev

    Add comment
    10|10000 characters needed characters exceeded