How to interact with a COM component from a Java class

Hi, could someone give a hint on what API I should explore in order to interact with a COM component from a Java class?
Thanks in advance
Luis

jacob sounds nice...http://danadler.com/jacob/

Similar Messages

  • HOW to Interact with Oracle HRMS applications from BPEL..

    Hi friends...
    Well...i just wanted to know HOW easy is it to interact with an Oracle HRMS application from within a BPEL process...
    [Say, my BPEL process has some approvals from Finance Dept.., but i need to contact some application like Oracle Payroll, for some data...]
    I think we would have to use some Application Adapter Service for this..but not sure..!
    Would be great if anyone could refer me to some links or guide me in this regard...
    Thanks...

    Hi,
         You can read the data using "Middlware Tools" like XI,Business Connector,Mercator,Webmethods
          and using DB-Link.
          If you want Read the data using ABAB coding, you need to use "Native SQL" Stament.
         For XI and other Middlware , you need configure so many steps,(RFC defination,PORT,Partner)
         Required. 
         Through ABAP Program :
         Befor creating program , You need to find out "Oracle Server Name and Other details.
          Please use below code as your reference.
    Open a native SQL connection.
    EXEC SQL.
    connect to 'ONECD'
    ENDEXEC.
    Retrieve information from the BVER tables.
    EXEC SQL PERFORMING read_dental.
    select emp_ssn_num, emp_fname, emp_lname,
    to_char(start_date, 'YYYYMMDD') as start_date,
    rec_type,
    to_char(eff_date, 'YYYYMMDD') as eff_date,
    vendor_plan_id
    into :dental
    from opr$8oc.BVER_CURR_DENTAL_MASTER
    ENDEXEC.
    EXEC SQL PERFORMING read_medical.
    select emp_ssn_num, emp_fname, emp_lname, rec_type,
    to_char(start_date, 'YYYYMMDD') as start_date,
    to_char(eff_date, 'YYYYMMDD') as eff_date,
    network_code, pcp_number, patient_flag,
    vendor_plan_id,
    to_char(network_eff_date, 'YYYYMMDD') as
    network_eff_date,
    to_char(pha_eff_date, 'YYYYMMDD') as
    pha_eff_date
    into :medical
    from opr$8oc.BVER_CURR_MEDICAL_MASTER
    ENDEXEC.
    Disconnect from the native SQL connection.
    EXEC SQL.
    DISCONNECT 'ONECD'
    ENDEXEC.
    The system log has messages like 'Work process is in reconnect status' and 'Work process has left reconnect status' after the ORA-02396 message. And I specifically do a disconnect at the end and a connect at the beginning, but it looks like it is trying to do a reconnect?
    Thanks,
    Pugazhenthi.P
    Satyam computer Services Ltd.

  • How to call a PL/SQL procedure from a Java class?

    Hi,
    I am new to the E-BusinessSuite and I want to develop a Portal with Java Portlets which display and write data from some E-Business databases (e.g. Customer Relationship Management or Human Resource). These data have been defined in the TCA (Trading Community Architecture) data model. I can access this data with PL/SQL API's. The next problem is how to get the data in the Java class. So, how do you call a PL/SQL procedure from a Java program?
    Can anyone let me know how to solve that problem?
    Thanks in advance,
    Chang Si Chou

    Have a look at this example:
    final ApplicationModule am = panelBinding.getApplicationModule();
    try
         final CallableStatement stmt = ((DBTransaction)am.getTransaction()).
                                                                                         createCallableStatement("{? = call some_pck.some_function(?, ?)}", 10);
         stmt.registerOutParameter(1, OracleTypes.VARCHAR);
         stmt.setInt(2, ((oracle.jbo.domain.Number)key.getAttribute(0)).intValue());
         stmt.setString(3, "Test");
         stmt.execute();
         stmt.close();
         return stmt.getString(1);
    catch (Exception ex)
         panelBinding.reportException(ex);
         return null;
    }Hope This Helps

  • How to get properties of a bean from another java class

    Hi,
    I am new to JSF. Currently I am facing a problem, and hope you experts can give me some guidance.
    The JSF app i am working on has one Java class for handling a tree structure, MyTreeNode.java, and it also has a bean, NameBean.java, which has two properties, username and password.
    I can easily associate an input text with the #{name.username} to store the user's login... but later on, I need to fetch that information inside of MyTreeNode.java. How do I do that? Thanks!
    -- Jim

    <managed-bean>
         <managed-bean-name>Person</managed-bean-name>
         <managed-bean-class>demo.PersonBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
         <managed-property>
              <property-name>bank</property-name>
              <property-class>demo.BankBean</property-class>
              <value>#{bank}</value>
         </managed-property>
    <managed-bean>
    <managed-bean>
         <managed-bean-name>bank</managed-bean-name>
         <managed-bean-class>demo.BankBean</managed-bean-class>
         <managed-bean-scope>session</managed-bean-scope>
    <managed-bean>this version doesnt work for me.
    does the single beans have to look any special?
    some demo code out there?
    thx!

  • How can JSP access a COM+ component

    I have to develop JSP pages that leverage existing Microsoft COM+ components. Can anyone suggest a good resource or provide me with a quick explanation/overview of how I would access a COM+ component from JSP? I'm getting exhausted searching the internet for answers only to come up empty. Thanks...

    I use Neva Object (www.nevaobject.com) for this sort of thing. This is a commercial product. The product does what it says it does and that is as far as I will endorse it.
    Since purchasing it I came accross
    http://staff.develop.com/halloway/code/jawin.html
    This looks like it will do much of the same thing but is more suitable for scriptable COM objects. It is also an open source license.
    I don't have any experience with jawin but the support community looks strong. Checking out their website will be worth your time.
    Good luck
    Bill

  • How to Use COM Component in a Java Bean

    Dear Sir,
    How can I use a COM Component in a Java-Bean . I am having a COM Component for reading Weighment Reading on a Serial Port and want to use this Component in a Java-Bean . I would also like to call the methods of this COM Component inside my Java-Bean . COM Component is a dll file .
    Please guide me how to go ahead . If possible kindly provide some sample code for the same .
    With Thanks and Regards
    B V Mittal

    You need a Java to COM bridge like Jacob. Try searching this forum for more information, I've answered this question several times before.
    Dom.

  • Running a Unix script from a Java class

    I am trying to use SCP (Secure copy) to copy an xml file from my J2EE application to a remote Unix server using a Unix script. How can I run the Unix script from my Java class? I could not find any resource for this on the internet. Can someone help me with this please.
    Thanks

    I am trying this below program ,but i am getting the error please help me
    import com.jcraft.jsch.*;
    import com.jcraft.jsch.Channel;
    import com.jcraft.jsch.JSch;
    //import com.jcraft.jsch.JSchException;
    import com.jcraft.jsch.Session;
    //import com.jcraft.jsch.UserInfo;
    import java.io.*;
    public class testrad {
    public static void main(String args[])
    String user="usertvr";
    String host="5.34.12.1";
    String cmd="ls -l";
    JSch jsch = new JSch();
    try{
    Session session=jsch.getSession(user,host,22);
    session.setPassword("$yhaj23");
    //UserInfo usrInfo=new MyUserInfo();
    //session.setUserInfo(usrInfo);
    session.connect();
    Channel channel=session.openChannel("exec");
    ((ChannelExec) channel).setCommand(cmd);
    channel.setXForwarding(true);
    channel.connect();
    //code
    channel.setInputStream(System.in);
    // channel.setOutputStream(System.out);
    //((ChannelExec) channel).setErrStream(System.err);
    InputStream in = channel.getInputStream();
    channel.connect();
    byte[] tmp = new byte[1024];
    while (true)
    while (in.available() > 0)
    int i = in.read(tmp, 0, 1024);
    if (i < 0)
    break;
    System.out.print(new String(tmp, 0, i));
    if (channel.isClosed())
    in.close();
    // System.out.println("JSCH: exit-status: " +
    //channel.getExitStatus());
    break;
    try
    Thread.sleep(1000);
    catch (Exception ee)
    channel.disconnect();
    session.disconnect();
    }catch(Exception e)
    {e.printStackTrace();
    System.out.println("Exception"+e);}
    /*public static class MyUserInfo implements UserInfo {
    public String getPassword()
    { return "password"; }
    public String getPassphrase()
    { return ""; }
    public boolean promptPassword(String arg0)
    { return true; }
    public boolean promptPassphrase(String arg0)
    { return true; }
    public boolean promptYesNo(String arg0)
    { return true; }
    public void showMessage(String arg0)
    Here is the error
    com.jcraft.jsch.JSchException: UnknownHostKey: 5.128.0.10. RSA key fingerprint is 02:a0:d6:c0:6f:69:2c:a9:a7:fa:7c:71:1c:60:ed:57
         at com.jcraft.jsch.Session.checkHost(Unknown Source)
         at com.jcraft.jsch.Session.connect(Unknown Source)
         at com.jcraft.jsch.Session.connect(Unknown Source)
         at testrad.main(testrad.java:23)
    Exceptioncom.jcraft.jsch.JSchException: UnknownHostKey: 5.128.0.10. RSA key fingerprint is 02:a0:d6:c0:6f:69:2c:a9:a7:fa:7c:71:1c:60:ed:57
    Can some one help me please.
    I running this program from Windows to connect to remote unix boxes.

  • I am having much trouble with the new reminders in IOS7 and how it interacts with Outlook Exchange. Many features lost in the new version.

    When I downloaded IOS7, I found that the reminders/task app and how it interacts with Outlook Exchange is much more difficult to use. Some of the issues that I am having are...
    1. Trying to edit my task on my phone is not possible, if the notes are lengthy. When you click on the text to edit data near the top, it will scroll to the bottom and not allow you to edit the text because you cant see it.
    2. Now all of my task are in one long list. I can not move from day to day like we could in previous version IOS6
    3. When I do edit a short task reminder and click done, it crashes and completly goes away. It does save the edit though
    4. You can only add task at the bottom of each days reminders. This is very inconvient and much more difficult than IOS6
    5. There is a major delay or latency when interacting inside of reminders in this version. Much more than IOS6. It is very unstable and quirky.
    I have never seen Apple take a step back with a product until now. I am a huge Apple fan and always will be, so I am hoping they make enhancements to fix these issue. It is a big time prodcutivity killer.
    Thanks for any and all help you can give.
    Troy Meachum

    Some power supplies or designed so that if there is a short or overload they shut them selfs off and some will not turn back on. Some have a relay that will click back on and work, some you have to  cycle the power switch. Those that won't come back on will have to be replaced. I'm not saying that yours is that type as I have no way of telling. But if you have a friend who will loan you a good power supply you might try it. As someone else said just turning off the power will not darn all the power from some motherboards. To test this turn off your power supply than turn on the computer with the start botton. Mine will flash the lights and fans will start to spin than die. So every time you turn off computer to work on it. After turning off PSU hit the start botton to drian any power left in it before working on it. Also do this after unplugging it just to make sure.

  • How to interact with database?

    Hi,
    I am exploring sampleportal application in Weblogic Portal8.1 SP4. There in login portlet they are using login.jsp file which uses examples.login.DirectorBacking class for login form authentication. DirectorBacking class uses default com.bea.p13n.security.Authentication class’s authenticate method for authentication. I could not understand the basic functionality of Authentication class as how it interacts with the database.
         Can we use simple JDBC for the login authentication in login.jsp ?

    U can define several authentication realms - which could be RDBMS, LDAP etc.
    Does that answer your question?

  • Using COM component from EJB

    Hi,
    I'd like to use a third party COM component from. I know JIntegra and such tools but I'd like to use a non-commercial software as I need it for my diploma thesis.
    Did anyone ever manage to call an ActiveX/COM component from an EJB. I mean a third party component, not a self developed one.
    Could I use M$ specific classes in my EJB or do they rule out each other?
    Any working example?
    TIA
    Frank

    Did you really manage to use third party DLLs with EZJCOM?
    Would be great if you could clarify this to me:
    If I would use M$ specific classes to have a Java / COM - communication then I would
    have to use M$ JVM, right?
    But if I use that VM, I can not use my classes within the J2EE / EJB environment as this
    requires Sun's JVM, right?
    So, if I use EZJCOM for that than I do not have to use any M$ specific stuff, right?
    Unfortunately, I did not get any further yet. The product I'd like to use is Lindo.
    I have the DLL, but trying to use it with EZJCOM it says: No COM interface definition.
    No tlb is given either. There's a JAR package with classes that seem to use JNI to call
    DLL functions, so maybe it does not provide a COM interface.
    But that means I would have to build my own (maybe VB) ActiveX DLL that calls all the funtions
    in the Lindo DLL. But that would keep me busy for weeks I guess :-(
    As I need it for my diploma thesis, I can not spend a lot of time building ActiveX components.
    Frank

  • How to delete/remove the software component from integration repository

    Dear All
    How to delete/remove the software component from integration repository which we have created some Data and message types.
    Regards
    Blue

    Hi,
      Follow the steps below to delete the Software component:
    1. Delete the created Data Types, Message Types, Message Interfaces, Message Mappings, Interface Mappings and other imported objects like RFC's or IDoc's. Activate all changes.
    2. Then delete the namespace and the default datatypes present with the namespace after checking "objects are modifiable".
    3. Then delete the SW component, after placing the radio button in "Not permitted".
    Regds,
    Pinangshuk.

  • Learning How to Interact With Jdeveloper

    How can i learn How to Interact With Jdeveloper ?

    start with this.
    http://www.oracle.com/technology/obe/obe11jdev/ps1/ria_application/developriaapplication_long.htm

  • How to deal with Cash Deposited/Withdrawn from Bank

    Gurus,
    How to deal with Cash Deposited/Withdrawn from Bank for office use.
    <b>Here is the senario:</b>
    When Cash is deposited in Bank the entry is
    Bank Main A/c Dr
    To Cash A/c
    and when Withdrawn from Bank the entry was
    Cash A/c Dr
    To Bank Main Account
    Now my question is, How we will deal with these transactions while creating Bank Reconcilation Statement. As per my knowledge.
    Bank Main Account Balance = Sum of all Bank Clearing Accounts.
    If the difference occurs with cheques we deposit it or make note of issue while BRS, which effect the Clearing Accounts, But, How about Cash Deposit and Cash Withdrawn, coz these won't effect any of the Clearing Accounts.
    How do deal with this.
    please advice.
    Satish

    Hi Satish,
    Through FBCJ transaction you can do the cash receipt / cash payment to Bank (Bank clearing Account). By using the Business transaction "Receipt from Bank" and "Payment to Bank".
    Hence bank posting will happen in the Bank clearing account. As soon as BRS is done, it will hit the Bank Main account.
    Hope it is clear for you. If my reply is useful than please assign points for the same.
    Thanks & best regards,
    nms

  • How can I call a pop up window from a java class ?

    Hi,
    I am developing a web app. I would like to call a windoz pop up from a java class.
    How can i do that ?
    Thanks

    user504072 wrote:
    It was possible to do it in ASP .NET even from the server side with the method Page.ClientScript. What do you think what Page.ClientScript stands for?
    I's an encapsulation for the JavaScript code required and hides the separation between frontend and backend. There was a reason why so many developers stick to the MVC-pattern wich ist violated here.
    I did not know it is not possible to do the same thing in Java.I'ts not a task of the backend to layout the user interaction GUI.
    bye
    TPD

  • Problem with return a ColdFusion query object from a Java class

    Hi!
    I need to return a ColdFusion query object from a Java class
    using a JDBC result set ( java.sql.ResultSet);
    I have tried to pass my JDBC result set in to the constructor
    of the coldfusion.sql.QueryTable class with this code:
    ColdFusion code
    <cfset pra = createObject("java","QueryUtil").init()>
    <cfset newQuery = CreateObject("java",
    "coldfusion.sql.QueryTable")>
    <cfset newQuery.init( pra.getColdFusionQuery () ) >
    My java class execute a query to db and return QueryTable
    Java code (QueryUtil.java)
    import coldfusion.sql.QueryTable; // (CFusion.jar for class
    QueryTable)
    import com.allaire.cfx //(cfx.jar for class Query used from
    QueryTable)
    public class QueryUtil
    public static coldfusion.sql.QueryTable
    getColdFusionQuery(java.sql.ResultSet rs)
    return new coldfusion.sql.QueryTable(rs);
    but when i run cfm page and coldfusion server tries to
    execute : "<cfset pra =
    createObject("java","QueryUtil").init()>" this error appears:
    Object Instantiation Exception.
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    If i try to execute QueryUtil.java with Eclipse all it works.
    Also I have tried to return java.sql.ResultSet directly to
    coldfusion.sql.QueryTable.init () with failure.
    Do you know some other solution?

    ok
    i print all my code
    pratica.java execute a query to db and return a querytable
    java class
    import java.util.*;
    import java.sql.*;
    import coldfusion.sql.*;
    public class Pratica {
    private HashMap my;
    private String URI,LOGIN,PWD,DRIVER;
    private Connection conn=null;
    //funzione init
    //riceve due strutture converite in hashmap
    // globals
    // dbprop
    public Pratica(HashMap globals,HashMap dbprop) {
    my = new HashMap();
    my.put("GLOBALS",globals);
    my.put("DBPROP",dbprop);
    URI = "jdbc:sqlserver://it-bra-s0016;databaseName=nmobl";
    LOGIN = "usr_dev";
    PWD = "developer";
    DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    try{
    // Carico il driver JDBC per la connessione con il database
    MySQL
    Class.forName(DRIVER);
    /* Connessione alla base di dati */
    conn=DriverManager.getConnection(URI,LOGIN,PWD);
    if(conn!=null) System.out.println("Connection Successful!");
    } catch (ClassNotFoundException e) {
    // Could not find the database driver
    System.out.print("\ndriver non trovato "+e.getMessage());
    System.out.flush();
    catch (SQLException e) {
    // Could not connect to the database
    System.out.print("\nConnessione fallita "+e.getMessage());
    System.out.flush();
    //funzione search
    //riceve un hash map con i filtri di ricerca
    public QueryTable search(/*HashMap arg*/) {
    ResultSet rs=null;
    Statement stmt=null;
    QueryTable ret=null;
    String query="SELECT * FROM TAN100pratiche";
    try{
    stmt = conn.createStatement();// Creo lo Statement per
    l'esecuzione della query
    rs=stmt.executeQuery(query);
    // while (rs.next()) {
    // System.out.println(rs.getString("descrizione"));
    catch (Exception e) {
    e.printStackTrace();
    try {
    ret = Pratica.RsToQueryTable(rs);
    } catch (SQLException e) {
    e.printStackTrace();
    this.close();
    return(ret);
    // ret=this.RsToQuery(rs);
    // this.close(); //chiude le connessioni,recordset e
    statament
    //retstruct CF vede HashMap come struct
    //METODO DI TEST
    public HashMap retstruct(){
    return(my);
    //conversione resultset to querytable
    private static QueryTable RsToQueryTable(ResultSet rs)
    throws SQLException{
    return new QueryTable(rs);
    //chiura resultset statament e connessione
    private void close(){
    try{
    conn.close();
    conn=null;
    catch (Exception e) {
    e.printStackTrace();
    coldfusion code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Test JDBC CFML Using CFScript</title>
    </head>
    <body>
    <cftry>
    <cfset glb_map =
    createObject("java","java.util.HashMap")>
    <cfset dbprop_map =
    createObject("java","java.util.HashMap")>
    <cfset glb_map.init(glb)> <!---are passed from
    another page--->
    <cfset dbprop_map.init(glb["DBPROP"])>
    <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    <cfset ourQuery
    =createObject("java","coldfusion.sql.QueryTable").init(pra.search())>
    <cfcatch>
    <h2>Error - info below</h2>
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    </cftry>
    <h2>Success - statement dumped below</h2>
    <cfdump var="#ourQuery#">
    </body>
    </html>
    error at line <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    -----------------------------------------------------------------------

Maybe you are looking for

  • Print Sharing Permission Issue???

    I am setting up print sharing with a Lexmark X5400 series printer. Workss fine on the local machine and connectivity to the share seems fine as well. When I print from any other machine (in this case Win XP) there is no error but it does not print. I

  • Fault message handling in syn proxy

    Hi Experts, I have implemented Proxy to Web service synchronization scenario and implemented request response and fault message mapping. But when the scenario is getting the Application error the fault message is visible in sxmb_moni but not visible

  • General Performance Issue

    In the last few days I've noticed a general degradation in the on-line performance of my iMac. For example, when I select a mail message that is heavy on graphics (like a Home Depot flyer or something) the text displays and then after four or five se

  • Can OS X drives be protected from boot camp, and how to backup?

    1. If I create a boot camp partition on my main drive, can I somehow protect my other drives and OS X partitions (and main drive OS X partition) from any possible tampering from a Win7 boot where I'm running software that could be infected or problem

  • DVD Slow and Whines

    New G5 with built in iSight. Matshita UJ-846 A lot slower burning than my other iMac (round white base). It makes a whinning noise half way through burning. DVD-R don't always eject. Should I send back for repair?