Discussions

General J2EE: Problem in fetching the documents from documentum 6.7 (Java)

  1. Hi All

     

    I am working on an application in which previously connection was made using dmjdbc 5.3 . Now I want to rewrite the code using DFS 6.7

     

    In earlier code Documents were fetched using

    if (format == null || format.equals(""))

       stat = conn.prepareCall("{? = call getfile(" + objid + ")}");

      else

       stat = conn.prepareCall("{? = call getfile(" + objid + ",,"+format+")}");

      stat.registerOutParameter(1, Types.VARCHAR);

      stat.execute();

      fileName = stat.getString(1);

     

    where conn is documentum type connection.

     

    But now I am trying to fetch the document using new way (DFS 6.7)

    com.documentum.fc.client.IDfDocument doc = (com.documentum.fc.client.IDfDocument)idfSession.getObject(new com.documentum.fc.common.DfId(objid));

                        com.documentum.fc.client.IDfFormat myFormat = idfSession.getFormat(doc.getContentType() );

                            filePath = documentRootDir +"
    "+ doc.getObjectName() + "." + doc.getContentType();      

                                                 doc.getFileEx2 (filePath,doc.getContentType(),0,"",false);

                                                fileName_new= doc.getObjectName() + "." + doc.getContentType();

     

    But  after implementing this way I am not able to open any documents in there original format.Documents get opened in the same IE window in different format.

     

    Please let me know if I Have adopted a wrong way to fetch the documents

  2. I suggest posting this question to the Documentum Community: http://developer.emc.com/documentum.

     

  3. Code to connect documentum 6.7[ Go to top ]

    Hi, Can you please share your code to connect documentum 6.7. on my e-mail : niravmodi2011 at yahoo dot co.in