Question

Viewing of DXL files in Notes Client.

Asked by: deepankar_das1

I have a requirement to be able to open an exported content of Notes email ( DXL ) to be opened uisng Notes Client. I used the DXLExporter class in Java/Corba toolkit  to create this file.

What/How do I make this file open using Notes Client( assuming Notes client recognizes the format, since it was exported ). Or are there any other ways that the I can view this exported DXL.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-10-09 at 10:24:26ID23801682
Topics

Lotus Domino Email Server

,

Lotus Notes

Participating Experts
2
Points
250
Comments
20

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. PL/SQL vs CORBA
    I need to know the difference of implementing a reservation system on the web using PL/SQL and CORBA. A specific CORBA impementation such as OrbixWeb may be used. Links to answers will be most welcomed.
  2. Linux and Corba
    Hi Hey I am again stuck in corba world I do have 1. Jdk 1.2.2 for linux I developed a small application on windows platform and i am porting on linux. but when i want to run server named HelloServer by command java HelloServer -ORBInitialPort 1050 it raises exception omg/or...
  3. What is CORBA?
    I want to know what is CORBA and how it can help us for e-commerce development. I want to know also how it can be implemented in Delphi. I prefere a discussion here instead of refering to an Internet sites. Thanks for all experts Motaz

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: mbonaciPosted on 2008-10-09 at 11:33:12ID: 22681133

You used DXLExporter to create DXL file from Domino data (document).

The DXLImporter class converts DXL to Domino data. Use the createDXLImporter method in Session to create a DxlImporter object. Input to DxlImporter can be a String, Stream, or NotesRichTextItem object. Output is to a Database object.
The import operation constructs a list of note IDs for the newly imported notes. You can access these note IDs using the getFirstImportedNoteId and getNextImportedNoteId methods.

Here's an example of an agent that converts a DXL file into a newly created database:

import lotus.domino.*;
 
public class JavaAgent extends AgentBase {
 
  static DxlImporter importer = null;
 
  public void NotesMain() {
 
    try {
      Session session = getSession();
      AgentContext agentContext = session.getAgentContext();
 
      // (Your code goes here) 
      // Get current database
      Database db = agentContext.getCurrentDatabase();
      // Get DXL file
      String filename = "c:\\dxl\\exporteddb.dxl";
      Stream stream = session.createStream();
      if (stream.open(filename) & (stream.getBytes() >0)) {
        // Create new database - replace if it already exists
        Database newdb = session.getDatabase(null, "imported");
        if (newdb.isOpen())
          newdb.remove();
        DbDirectory dbdir = session.getDbDirectory(null);
        newdb = dbdir.createDatabase("imported", true);
        newdb.setTitle("Imported");
        // Import DXL from file to new database
        importer = session.createDxlImporter();
        importer.setReplaceDbProperties(true);
        importer.setReplicaRequiredForReplaceOrUpdate(false);
        importer.setAclImportOption(
          DxlImporter.DXLIMPORTOPTION_REPLACE_ELSE_IGNORE);
        importer.setDesignImportOption(
          DxlImporter.DXLIMPORTOPTION_CREATE);
        importer.importDxl(stream, newdb);
      }
      else
        System.out.println(filename + " does not exist or is empty");
 
    } catch(Exception e) {
      e.printStackTrace();
      
    } finally {
      // Print importer log
      try {
        System.out.println(importer.getLog());
      } catch(Exception e) {e.printStackTrace();}
    }
  }
}

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:

Select allOpen in new window

 

by: deepankar_das1Posted on 2008-10-09 at 11:41:24ID: 22681187

thanks for the inputs. But my question was how can a Notes client be automatically made to be launched when we click on a DXL file. I'm not sure if this is possible or not.

The reason why we need this is that the users don't want to just open the emails right there and not do this as a multi step process of
1. Creating a temp nsf file.
2. Importing all the DXL files into that database.
3. Now open Notes client and view the emails imported through DXL.

 

by: mbonaciPosted on 2008-10-09 at 11:50:29ID: 22681258

I thought that your clients have Notes opened. Then you would develop e.g. action "Import DXL" in the Inbox folder, which the user would click and choose DXL file. That's it. You would, of course, convert dxl into docs and refresh the view/folder...

And although it would be the most practical solution, It can't be done the way you want - double click on dxl file in windows explorer.

Mb¤

 

by: mbonaciPosted on 2008-10-09 at 11:52:45ID: 22681280

And yes, the code was just example from Designer help, you wouldn't create db every time you import something, of course :)

 

by: sjef_bosmanPosted on 2008-10-09 at 15:10:05ID: 22682901

Watch out when importing DXL: if there are Reader fields in the document you might not even see it after importing it!

If the mail is a plain text mail, so no crypting and no images, you might be able to find an XSLT-tool and a transformation xsl-stylesheet. Or you have to develop a transformation xsl-stylesheet. Not easy but doable. In that case you wouldn't even need Notes to view it, just a browser (if you translate the DXL to HTML).

There's another option, which would even allow you to get rid of the DXL: just forward the mail... :-))

By the way, if you double-click a .nsf database, Notes will automatically start and open that db.

 

by: deepankar_das1Posted on 2008-10-15 at 11:37:32ID: 22724164

I tried to use the code as specific above to import an DXL file into a newly created database. Note I'm running this on a separate box using the Java/Corba api. I get the following exception

NotesException: Disk i/o is a restricted operation
        at lotus.domino.NotesExceptionHelper.read(Unknown Source)
        at lotus.domino.NotesExceptionHolder._read(Unknown Source)
        at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
        at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
        at lotus.domino.corba._IDxlImporterStub.importDxlStream(Unknown Source)
        at lotus.domino.cso.DxlImporter.importDxl(Unknown Source)

I did try to enable the flags to be able to run the restricted operations for the userId( Session is created uisng this Id) but did not change the behaviour.

I would appreciate any pointers.

Paresh

 

by: deepankar_das1Posted on 2008-10-15 at 11:40:31ID: 22724186

Here's the attachment showing the settings that I have on the server.

  • permissions.doc
    • 83 KB

    screen shot of Domino Administrator showing the persimison setting for restrcited ops.

 

by: sjef_bosmanPosted on 2008-10-15 at 13:38:03ID: 22725588

Is it an agent? Try to set, in the Agent Properties box, the Runtime security level to 2 or 3.

Or where is your Java running? What permissions do you have on the system you're running your program on??

 

by: deepankar_das1Posted on 2008-10-15 at 13:50:49ID: 22725741

Not it is not an agent. My Java program is running on a Windows box as a service under Tomcat and I'm using the Java/Corba toolkit api's.

 

by: sjef_bosmanPosted on 2008-10-15 at 14:14:59ID: 22725980

Did you try to add your username to the people allowed to run Unrestricted agents?

 

by: deepankar_das1Posted on 2008-10-15 at 14:43:57ID: 22726251

If I allow the user to "Run Unrestricted methods and operations" I get the following exception. Note this worked when I used Notes.jar through my service, as I also have the Notes client installed locally. But I don't want to use it since it prompts me during the runtime for password before importing the document. Whereas using the remote calls since my session is already established using an username/pasword I don't have this problem. Hence I'm using the remote calls to achive this.

NotesException: DXLImporter output object is invalid, uninitialized, or not explicitly declared and strongly typed
        at lotus.domino.NotesExceptionHelper.read(Unknown Source)
        at lotus.domino.NotesExceptionHolder._read(Unknown Source)
        at lotus.priv.CORBA.iiop.RepImpl.invoke(Unknown Source)
        at lotus.priv.CORBA.portable.ObjectImpl._invoke(Unknown Source)
        at lotus.domino.corba._IDxlImporterStub.importDxlStream(Unknown Source)

I'm using the DxlImporter as follows.
        .....
        // Import DXL from file to new database
        importer = session.createDxlImporter();
        importer.setReplaceDbProperties(true);
        importer.setReplicaRequiredForReplaceOrUpdate(true);
        importer.setInputValidationOption(DxlImporter.DXLVALIDATIONOPTION_VALIDATE_NEVER);
        importer.setAclImportOption(
                          DxlImporter.DXLIMPORTOPTION_REPLACE_ELSE_IGNORE);
        importer.setDesignImportOption(
                          DxlImporter.DXLIMPORTOPTION_CREATE);
        importer.importDxl(stream, newdb);
        .....

I'm using Notes 6.5 as the Domino Administrator Client.

 

by: deepankar_das1Posted on 2008-10-15 at 15:00:24ID: 22726428

Is it possible becuse this is a remote api its acutally trying to locate the database file on the server box where I'm connected when the
                            importer.importDxl(...)
is executed. This is something that I'm trying to execute locally on my Windows box where the database file is. Is my understanding right here??

If remote api's is not the one to use as the database exists locally,  how can I prevent the prompt for the password during the import operation which I get when I use the Notes.jar file.



 

by: sjef_bosmanPosted on 2008-10-15 at 15:09:36ID: 22726515

Seems a complete copy/paste from the Help db to me, so it should work. What line does the execution stop at? The first one, at the createDxlImporter?

 

by: sjef_bosmanPosted on 2008-10-15 at 15:18:29ID: 22726581

Aaaah, you're right, that isn't possible.  The database must reside on the server. The only way to use a local database would be through a Local Notes client, using the COM interface. Maybe it's possible via Java and the Lotus.NotesSession objects (not Domino.Notes), but that I don't know.

 

by: deepankar_das1Posted on 2008-10-15 at 15:19:54ID: 22726588

No as I indicated it happens when we exeucte the importer.importDxl(..) stmt. Could you please clarify the above question as well. There's no point looking into it if the remote calls will not work for local databases.

 

by: deepankar_das1Posted on 2008-10-15 at 15:23:49ID: 22726616

I undid the permission for "Run unrestricted methods and operations" due to the exception. Can you tell me what I need to set based on the attached document.

 

by: deepankar_das1Posted on 2008-10-15 at 15:27:35ID: 22726637

Sorry I missed you previous response. So now if I use the Notes.jar for which the import works, what settings do I need to have. Can I put somethings inside the notes.ini to not prompt for the password and proceed.

 

by: sjef_bosmanPosted on 2008-10-15 at 15:29:48ID: 22726651

The password is required to allow the Notes-layer to access the server, by means of opening the ID-file. There is the possibility in COM to create a Session in combination with a name and a password, but whether that works for Java as well ... dunno.

I'm off now. I'll read the attachment tomorrow. Sorry (yawn).

 

by: mbonaciPosted on 2008-10-16 at 01:20:07ID: 22728850

For local calls:
- you don't need CORBA.
- the classpath must include Notes.jar (for local calls).
- path has to include Lotus\Notes dir.
- the interfaces in lotus.domino package are implemented in package lotus.domino.local.

The local calls require that the NotesThread class manages threads (because NotesThread extends java.lang.Thread to include special init and term codes for Domino.
You have three options to execute threads:
- through inheritance
- through the Runnable interface
- through the static methods

To avoid password prompt (when accessing through the Notes ID) create session like this:

Session s = NotesFactory.createSession((String)null, (String)null, "password" )

Note that the ID file through you access session is specified in KeyFileName variable in first Notes.ini in path.


Hope this helps,
mb¤

 

by: deepankar_das1Posted on 2008-10-16 at 11:20:19ID: 22734131

I created the Session without specifying the userName and I did not see the prompt. Thanks for the help.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...