Solved

Accessing Exchange addresses through Java

Posted on 1997-11-18
3
158 Views
Last Modified: 2010-04-16
I have a user table, group table, and a table that maps users to groups.  The users table contains email addresses, and rather than having to manually update these addresses I would like to obtain the information kept by Microsoft Exchange and use that to populate and update the email addresses.  Is there a way I can do this?
0
Comment
Question by:syeah
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
jpk041897 earned 200 total points
Comment Utility
There is a way you can do this, although I have not tried the technique on your specific problem so I did not post sooner waiting for someone to offer an alternative solution.

MS Exchage is an OLE automation server so you can acces its tables via OLE, COM and DCOM commands.

This gives you a rather broad line of alternative approaches to obtain the information you require.

1.- You can use JNI to access a method that uses either OLE2 or COM to obtain the exchange methods that return the dtat you require. You can then use JNI again to call these methods and obtain the data.

2.- You can use Sun's Java to Active-X bridge to obtain a similiar situation. Active X runs over DCOM which is simply an RPC envelope over COM, so you could access the data you require using this approach.

Solution 1 would work best for stand alone applications while solution 2 would probably work better for applets.

Solution 1 would require C++ coding while solution 2 would be a pure Java approach. While (2) could certanly work in a stand alone app., coding would be a bit more complex, but would yield pure a Java solution. I mention this sice your question does not specify any restrictions.

An alternative (though not elegant) solution would be to access the exchange files directly to obtain the information you require. Such a solution would have the disadvantage of probable incompatibility with future versions of Echange but would be portable across OS's (whic is probably not an issue in your app).

Hope this helps, and I'll be glad to answer any additionalt questions once you decide on one of these alternatives.
The main advantages of using OLE automation, is that you can not only access the information, but that you can use Exchange itself to handle the updating of data for you.


0
 

Author Comment

by:syeah
Comment Utility
I am definitely interested in solution 2, mainly because it is a pure Java solution.  I am very unfamiliar with Exchange and where the information is kept, so I will need more information on that to fully understand.  Also, will an Active-X invlolved solution work in Netscape?  If you could send me more detail on this solution, it would be greatly appreciated.  You have already given me a ray of hope for a solution.
0
 
LVL 6

Expert Comment

by:jpk041897
Comment Utility
Active X solutions work fine in Nestcape 4+ but not in earlier versions. Although I thought you specified your solution as a stand alone application so I don't quite see where Netscape would come in.

If your question about Netsacpe is related to using and ActiveX solution, Active X is only a wrapper over DCOM (DCOM as I mentioned before is a distributed version of COM, which i just another name for OLE 2) that allows you to embed an OLE control on a web page. The OLE control, or application does not need to be embeded in order to be accesed.

Regarding documentation: You can get all the documentation that you need on exchange and COM/DCOM/OLE at:

http://www.microsoft.com/msdn

I believe you have to register to access the information, but registration its a free service.

You can dowload the Beans to Active X Bridge from:

http://www.javasoft.com/beans/software/bridge/index.html

as well as consult related documentation there.

Now, your situation is as follows (following solution (2) proposed earlier) Exchange is an OLE automation server which allows linking and embeding (not that you need these last 2 features for your app). As such, it is considered a COM object whoms properties may be accessed and modified by an active-X object property sheet. As such, the Beans to Active X bridge should allow you to access the object's (Exchange) property sheets as if they were a standard bean application.

All you realy need to do is hunt down in the MSDN, which properties allow you to manipulate the exchange databases.

One hurdle you might run into, is that you might have to build the exchange property sheet by writting a simple COM client app. (OCX). This OCX can then be acceses by beans.

Visual C++ contains sample code on how to write such an OCX client (if it were to become necesary to do so).

The process is not straight forward, so if your OLE/Bean knowhow is limited, plan on spending 2 or 3 weeks in the process.

Hope these comments help you in solving your problem.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now