Get Resource Access Descriptor from OID in Java

Hi,
I'm trying to get my ADF program to read DB credentials from a Database RAD - Resource Access Descriptor defined for my SSO users in OID (version 10.1.2.1.0).
Examples are rare and sometimes they refer to deprecated functions or librairies.
If someone had already the pleasure ;-) of reading username, password and database from a predefined RAD in OID please help: steps, examples, version of libraries, anything would be very much appreciated.
Many thanks in advance,
Pierre

The api�s are suitable for the values in proper table
format.
But the excel sheet is like a form and from that i
have to get the values.Write an ActiveX plug-in for Excel that will send the values to your Java program. Or write an ActiveX plug-in for Excel that runs your Java program and passes it the values.

Similar Messages

  • OID Resource Access Descriptors in Forms and Reports

    Dear Colleage,
    In my Forms application (Oracle Application Server 10g (version 9.04), I call Reports from certain Forms. I have have SSO activated in both Forms and Reports. I have also defined two RADs (Resource Access Descriptors) in the OID called RKMSPROD and RKMSTEST, i.e. for the production DB and test DB respectively. I successfuly configured my formsweb.cfg file with [RKMSPROD] and [RKMSTEST] and can access the the corresponding DB using the URL parameter, e.g. CONFIG=RKMSTEST.
    Question 1
    ========
    Is the DB connection associated with the RADs (i.e. RKMSPROD or RKMSTEST in my case) implicitly passed on to the Reports server when I start a report job via the built-in RUN_REPORT_OBJECT or do I have to explicitly add the SSOCONN=RKMSTEST parameter before using the built-in RUN_REPORT_OBJECT?
    Question 2
    ========
    If I have to set the SSOCONN, how can I find out programatically, which RAD is currently active? I am using the same forms to access the two different DBs.
    Best regards,
    Charles

    Connect info is passed when making the RUN_REPORT_OBJECT call. No changes to Reports is needed. The only requirement is that both Forms and Reports have SSO enabled. The same information used to connect to Forms will be used to connect to Reports.
    More details are described in the Forms/Reports Integration White Paper:
    http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
    Specifically refer to the section titled "Using the Run_Report_Object () Built-in" on page 20.

  • Getting exception while trying to access OIM from a standalone java program

    Hi All,
    When i am trying to run the below java class i am getting some exception. Please suggest.
    import java.util.Hashtable;
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Vector;
    import com.thortech.xl.util.config.ConfigurationClient;
    import Thor.API.tcResultSet;
    import Thor.API.tcUtilityFactory;
    import Thor.API.Operations.tcGroupOperationsIntf;
    import Thor.API.Operations.tcUserOperationsIntf;
    import Thor.API.Security.ClientLoginUtility;
    import Thor.API.Security.LoginHandler.LoginSession;
    public class OIMAPI {
    public static void main(String[] args) {
    try{
    System.out.println("Startup...");
    System.out.println("Getting configuration...");
    ConfigurationClient.ComplexSetting config =
    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
    System.out.println("Login...");
    Hashtable env = config.getAllSettings();
    tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","xelsysadm");
    if (ioUtilityFactory!=null){
    System.out.println("Login OK...");
    System.out.println("Getting utility interfaces...");
    tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf)ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    System.out.println("Starting processing...");
    for (int i=0;i<2;i++){
    Map attrs = new Hashtable();
    attrs.put("Users.User ID","testuser"+i);
    attrs.put("Users.Last Name","lastname"+i);
    attrs.put("Users.First Name","firstname"+i);
    attrs.put("Organizations.Key","1");
    attrs.put("Users.Role","Full-Time");
    attrs.put("Users.Xellerate Type","End-User");
    attrs.put("Users.Password","welcome1");
    long t1 = System.currentTimeMillis();
    long key = moUserUtility.createUser(attrs);
    long t2 = System.currentTimeMillis();
    System.out.println("User testuser" + i + " with key=" +
    key + " created in "+(t2-t1));
    System.out.println("Processing DONE...");
    ioUtilityFactory.close();
    }catch(Exception e ){
    System.out.println("---" + e.getMessage());
    e.printStackTrace();
    ---Unable to locate a login configuration
    java.lang.SecurityException: Unable to locate a login configuration
    at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:97)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at javax.security.auth.login.Configuration$3.run(Configuration.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.Configuration.getConfiguration(Configuration.java:215)
    at javax.security.auth.login.LoginContext$1.run(LoginContext.java:170)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.login.LoginContext.init(LoginContext.java:167)
    at javax.security.auth.login.LoginContext.<init>(LoginContext.java:404)
    at Thor.API.Security.LoginHandler.jbossLoginHandler.login(Unknown Source)
    at Thor.API.Security.ClientLoginUtility.login(Unknown Source)
    at Thor.API.tcUtilityFactory.<init>(Unknown Source)
    at OIMAPI.main(OIMAPI.java:28)
    Caused by: java.io.IOException: Unable to locate a login configuration
    at com.sun.security.auth.login.ConfigFile.init(ConfigFile.java:206)
    at com.sun.security.auth.login.ConfigFile.<init>(ConfigFile.java:95)
    ... 17 more

    you need to tell it where the config files are
    java -DXL.HomeDir=C:\oimqa\xlclient -Djava.security.auth.login.config=C:\oimqa\xlclient\Config\authwl.conf
    the authwl.conf file will have a different name depending on which app server you use
    authwl is for Web Logic (for example).

  • How to get UTF-8 Characters from HTML to Java?

    Hi everyone, I'm trying to set up an application that will allow display and entry of international data from HTML forms via servlets. The problem is that I can't get the data back into a java string to apply to the DBMS.
    I have tried using UTF-8 and specific character sets such as ISO-8859-5 (Russian). I have specified these character sets/encodings as follows:
    HTML: meta content-type header charset=xxx and <form accept-charset=xxx
    Servlet Response: setLocale(appropriate locale) and setContentType("text/html; charset=xxx") prior to calling response.getWriter()
    Servlet Request: setCharacterEncoding("xxx") (e.g. servlet 2.3)
    When I use request.getParameter(xxx) I get normal characters (a, b, c) and nothing for international characters or sometimes question marks.
    I have also tried various combinations of:
    new String(request.getParameter("xxx").getBytes("xxx"),"xxx")
    Could someone please point me in the right direction?
    TIA

    Thanks for all of your suggestions. It still refuses to work.
    I entered the following: ���^�E on the HTML form using the Chinese(PRC)keyboard on my Win2K box.
    I checked and verified the correct encoding in the servlet request (GB2312 for chinese characters)
    request.getParameter(xxx) yields ???
    new String(request.getParameter(xxx).getBytes("GB2312")) yields three boxes (values 20309, 27946 and 23380)
    new String(request.getParameter(xxx).getBytes("GB2312"), "UTF-8") yields nothing
    Any ideas?

  • Oracle Portal and access data from OID

    I was trying to do the employee search on Portal. I need to enter firstname or lastname of an employee and click search button and it display employee details
    These are the steps I followed
    I created a database provider "Portal1" using the schema Portal
    Then I created a dynamic page using that provider
    This is the code I have in the dynamic page
    <HTML>
    <HEAD>
    <TITLE>Example</TITLE>
    </HEAD>
    <BODY>
    <H2>Example of A Dynamic Page</H2>
    <ORACLE>SELECT * FROM PORTAL.WWSEC_PERSON
    </ORACLE>
    </BODY>
    </HTML>
    Dynamic page was created successfully.
    This is my intention. Create a dynamic page and run it as a portlet and publish it in the portal repository. Then use that portlet as any other portlet on the page.
    I assume if I use a bind variable in the sql, I'll be able to pass the parameter (lastname/firstname) from the page and display the employee details on the page.
    This is my problem. When I tried to run the dynamic page as portlet, I am getting the following error. Please advise if I am doing something wrong or is there any other way to access emplyee details
    INTERNAL ERROR
    "Failed to parse the query, ORA -00942 table or view does not exist
    Failed to parse as PORTAL_PUBLIC - SELECT * FROM PORTAL.WWSEC_PERSON$
    The preference path does not exist - ORACLE.WEBVIEW.PARAMETERS
    Thanks

    As the forum name says: "product-related questions cannot be answered here"
    Please choose an appropriate Portal forum for your questions.

  • Getting all superclass descriptors from project at runtime.

    For various reasons we inspect the descriptors on a mapped object at runtime.
    The problem is that the descriptors in the project will not return mappings for superclass fields that are privately owned unless the project is obtained from a session that has connected to the database.
    If the project is obtained from a session that has connected to a database, all the mappings for the subclass and the superclass are available.
    If the project is simply instantiated, only the mappings for the subclass and the public mappings for the superclass are available.
    e.g.
    class A {
    private Z;
    public M;
    class B extends A {
    private X;
    Without connecting to a database the descriptor for B will only return the mapping for M and X;
    Connected to the database the descriptor for B will return the mappings for Z,M and X.
    Is there anyway to get the privately owned mappings for a superclass from the project without acquiring a database connection?

    The descriptors are initialized as part of the login process. This process validates all descriptor configurations and mappings and as part of that sets up the inheritance relationships.
    The only way to determine this before login is to look at the parent class and separately look it up in the project and navigate its mappings.
    Doug

  • Getting the log files from client using java program

    hi
    this is lalita...and i am doing a project in networking.... i am new to socket programming....i have established the socket connection between the client and server...with this site members' help....now i have to get the log files of the client system from the server.... via the created socket....i need it by tomorrow...i.e apr 12th ....as i have to show it to my guide...
    i just need a core java program that will get the log information of the client from the server......
    Can anybody please help me in this regard..... it would be of great help to me and my group....
    Anxiously awaiting for the replies....
    Thanking you and regards...
    Lalita.

    Simple.
    Server is listening on a specific port for the connection from the clients.
    Connect the client with the server on the above mentioned port.
    Open the streams on both side for the connection and run in separate thread.
    Define a protocol for communication between client and server.
    e.g after connection with the server the server send a text message to the client (send log) now the client first should the log file name and size to the sever and then send the file. the server should save the file.
    then disconnect the client or want to get another file or for other tasks define the other commands

  • Can you get userid and username from OID through sqlplus?

    Anyone know where the user information stored in OID, I mean which table and schema. Thanks!

    Yes you could, but the query would be difficult. LDAP which has a tree-like structure is stored in relational tables. So, in order to get the data you will need to poke into tables in the ODS schema of the metadata repository.
    Have a look at ods.ct_dn and ods.ds_attrstore.
    But take my advice and stick to ldap commands. You can also use the dbms_ldap package from pl/sql.
    cu
    Andreas

  • How to get Stored Proc name from ReportClientDoc object (java)

    Post Author: cpriyanka
    CA Forum: Exporting
    We are using Crysta Report 9 and Java.
    We create ReportClientDocument by mentioning report template name ("rassdk://" + report template file path).
    Once I open ReportClientDocument, is there way I can get stored procedure name that is used (associated to report template) to get data in report.
    Thanks,
    Priyanka

    Post Author: cjmorris1201
    CA Forum: Exporting
    Priyanka,
    I am not too sure about the ReportClientDocument and java.
    Where I work we use 8.5, .Net.  We use ttx files to define our data source. 
    I can use something similar to below to retrieve the ttx name programmatically.  Perhaps you can use something similar:
    oCrystalSession.oRpt.Database.Tables.Item(1).Name
    Good luck!

  • How to access MS ACCESS database from Solaris running Java application

    Hello I have a reqmt
    My Java application is running on Weblogic server on Solaris 2.7 and now I want to connect to MS Access database running on Win NT.
    How do I do that??
    Any help is appreciated
    Thanks
    Suresh

    You have to use a proxy server and client.
    You can search for commercial solutions via the sun jdbc site or use RmiJdbc at http://www.objectweb.org/

  • Exercise 8, Ch Access Control from Thinking  in Java

    I am learning java using Bruce Eckel book "Thinking in Java" 4th edition and I got stuck on one exercise:
    .. create a class called ConnectionManager that manages a fixed array of Connection objects. The client programmer must not be able to explicitely cteate Connection objects, but can only get them via a static method in ConnectionManager. When the ConnectionManager runs out of objects, it returns a null reference."
    So, as I understand client programmer should be able to use Connection object meaning the class is public, but cannot create one. Creating Connection objects is granted only to ConnectionManager. How to permit creating objects only to an object of certain type?
    serezha.

    Hi Peter,
    the point to look at is the Product Availability Matrix under service.sap.com/pam
    There max NW 7.0 EHP1 is supported for the java platform.
    Only thing you could do is to open an OSS message to clarify if and when it will be supported.
    Best,
    Frank

  • Creation of users in OIM from OID, where OID is target resource

    Hi,
    I am new to OIM. We have a scenario where we have OIM and OID. The users are being created in OID. Now we need to get these users to the OIM system to use the Change Password, Forgot Password functionalities of OIM. Can we have OID as the target resource for OIM and have a reconciliation done to get all the users from OID and have them created in OIM.
    Or this possible only when OID is the Trusted Source?
    Thanks in advance,

    Re: OIM's Trusted Source

  • Why do I get multiple class files from 1 java file?

    I wrote a dialog box using gridBagConstraints and another program RunPanel to run it as a java application. For the first time since playing with java, I get multiple class files from a single java file.
    This seems very strange to me and wonder if anyone else has come across this and what could possibly be the reason for it. I did a clean (in Eclipse) just to make sure it wasn't garbage and sure enough they come back again.
    I have ReconPanel.java from which I get ReconPanel.class with the addition of ReconPanel$N.class where N goes from 1 to 5.
    The same thing in RunPanel but here there is only 1 extra file, RunPanel$1.class.
    I'll include the code for RunPanel since it is relatively small:
    package ilan;
    import javax.swing.JFrame;
    public class RunPanel extends JFrame {
         private static final long serialVersionUID = 1L;
         private ReconPanel m_reconPanel = null;
         public RunPanel() {
              super();
              initialize();
          * This method initializes this
         private void initialize() {
            this.setTitle("tester");
            this.setSize(new java.awt.Dimension(138,396));
            this.addWindowListener(new java.awt.event.WindowAdapter() {
                 public void windowClosing(java.awt.event.WindowEvent e) {
                      m_reconPanel.exitPanel();
                      System.exit(0);
              m_reconPanel = new ReconPanel();
              this.getContentPane().add(m_reconPanel);
          * @param args
         public static void main(String[] args) {
              JFrame frame1 = new RunPanel();
              frame1.setVisible(true);
    }  //  @jve:decl-index=0:visual-constraint="10,10"The only thing "unusual" I do is to put a listener on the WindowClosing so that I can go back to ReconPanel and write results to the registry.
    Can anyone tell me what is going on?
    Thanks,
    Ilan

    He IIan,
    Yes, you get number of extra class files based on your number of anomyous class es used. Like in your RunPanel, you get only 1 ..$1.class file, b'coz u have used only 1 annomyous class & i.e WindowAdapter. Take a look at this code :-
    this.addWindowListener(new java.awt.event.WindowAdapter() {
                 public void windowClosing(java.awt.event.WindowEvent e) {
                      m_reconPanel.exitPanel();
                      System.exit(0);
            });Similarly, in your ReconPanel, you must have used such kind of classes 5 times, & hence u get such 5 extra classes. To avoiod such extra classes, if you can directly implement that interface or extend the class, if possible will be best. For example, for each button, u write
    button1.addActionListener(new ActionListener() {
    // Code
    });Instead, of this, its better to implement ActionListener & write
    button1.addActionListener(this);
    public void actionPerformed(ActionEvent ae) {
       if (ae.getSource() == button1) {
       // CODE
       }Likethis, you can get rid of such numerous extra class files. In IDE, if you ask to add actionEvent, it will do the first method. To get rid of it, don't add event in the properties, instead, apply the second method. The same thing applies for anyother event. The first option is worthful, if by implementing, u got to write 5 functions from which u r gonna use just 1 method.
    Hope this clears your question.
    Trupti

  • How To Display User Photo (jpegphoto attribute) From OID LDAP Entry

    Hello everyone,
    I've spent a few days looking for a solution to this problem with no luck.
    I have a PLSQL database package that generates an organisation chart of users. It works fine but I am struggling to retrieve the users photo.
    I have tried linking to the jpg files in my /oiddas/ui/oracle/ldap/das/Images/users/ folder but these files do not always exist so this is unreliable. These files only appear to be created if a user has previously viewed their profile in Self Service Console. Even if the files exist they are often out of date and don't reflect the photo held in OID.
    I know the photo is stored in the jpegphoto attribute and I have been using DBMS_LDAP calls to retrieve other user details but I just can not find a definitive answer to how I send this image to the browser.
    If anyone has any ideas, sample code or web links it would be appreciated.
    Thanks,
    Matt

    The idea would be to get the attribute value from OID using DBMS_LDAP or Java (whatever is easyer for you) and dump it in a file. Then generate the URL to the file.
    When you initiate the LDAP connection to get the picture, remember to specify jpegphoto as a binary attribute.
    Octavian

  • OID And Java Hash Algorithm Output Differences?

    Hi,
    Can anyone tell me why I am not able to recreate the OID ldap password hash algorithm? Or can anyone tell me why I get these subtle differences between my Java created message digest and the one that is read directly from the oracle ldap hint password field? They are both based on the same original word "test".
    OID Hint Password from ldap ==> {SHA}zrFqbho8VPUOnVvtyUb4c+RWF+k=
    Hash created based on input ==> {SHA}zrFqbho8VPUOP1vtyUb4c+RWF+k=
    Here is a little background. I am working on developing a custom forgot password feature for my web site using OID 10g R2 and Java. I am able to retrieve the oracle hint password from OID using Java JNDI as the orcladmin. This ldap password is a SHA message digest, or hash, that is base 64 encoded. Since it is a one way algorithm I can not decrypt. So instead I take the clear text password string provided by the user and create a message digest(SHA) and then encode in base 64 using Java 1.4.2 like so;
    MessageDigest md = MessageDigest.getInstance("SHA");
    md.update(clearTextPassword.getBytes());
    String userSuppliedPassword = new String(md.digest());
    BASE64Encoder base64encoder = new BASE64Encoder();
    String output = "{SHA}" + base64encoder.encode(userSuppliedPassword.getBytes());
    By the way, I have been able to work around this issue by performing the compare using JNDI search but was curious why this was happening. Thanks!

    Hi
    I am having similar issue. I have to save passwords in encrypted form to LDAP. But not working. I am prepending the encrypted password {SHA} so OID should not convert further.
    Any help is appreciated
    Thanks

Maybe you are looking for