Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Accessing Exchange addresses through Java

Posted on 1997-11-18
3
Medium Priority
?
208 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 400 total points
ID: 1230865
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
ID: 1230866
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
ID: 1230867
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

963 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