Get Datas from MS-Exchange ?

Discussion in 'Java' started by pcouas, Aug 8, 2006.

  1. pcouas

    pcouas Guest


    I search an free API for connecting my Java Application with an
    MS-Exchange 2003.
    I search an LDAP API connection, or perhaps an COM Bridge like JACOB
    Do you have an idea ?


    pcouas, Aug 8, 2006
    1. Advertisements

  2. To talk the Exchange protocol specifically (MAPI) and not standard SMTP
    you are very limited when it comes to a Java API. I've only found one
    library that provides a Java API for MAPI (there are tons of C/C++ APIs
    though) and that is the J-Integra library. Depending on your licensing
    the API can be very expensive (which caused the project I was on to go
    down a different route by using a C++ .dll and calling it using JNI in

    Hope that helps you
    Brandon McCombs, Aug 9, 2006
    1. Advertisements

  3. pcouas

    pcouas Guest

    pcouas, Aug 9, 2006
  4. You can use any POP3 or IMAP client to talk to Exchange, which
    supports both protocols in addition to MAPI. Try JavaMail.

    In your original post you mentioned LDAP. Any LDAP client should work
    with Exchange to get e.g. address book information. A search for Java
    LDAP should result in many hits.

    Gordon Beaton, Aug 9, 2006
  5. pcouas

    pcouas Guest


    I want get result from EXCHANGE. Currently My Application support
    OPENLDAP (jldap)and Notes (notes.jar) and Outlook (Jacob)

    It seems me MAPI protocol need an Third part vendor and is not include
    in JavaMail itself for reading Contact list ?

    pcouas, Aug 9, 2006
  6. MAPI is a proprietary protocol, but YOU DON'T NEED MAPI.

    Exchange supports IMAP and POP3 for reading mail, as does JavaMail.
    Exchange also supports LDAP, which you can (AFAIK) use to read from
    contact lists.

    Gordon Beaton, Aug 9, 2006
  7. pcouas

    pcouas Guest

    Ok, but Jdap API which is Java Api for OPENLDAP don't support EXCHANGE
    Which free LDAP JAVA implementation could i use for reading contact
    list from Exchange server ?
    pcouas, Aug 9, 2006
  8. pcouas

    pcouas Guest

    Perhaps with JNDI ?
    pcouas, Aug 9, 2006
  9. I have used several more or less randomly chosen LDAP browsers to
    communicate with an Exchange server without any problems. I don't
    believe that OpenLDAP or JLDAP are incapable of this, so perhaps you
    need to check your configuration or ensure that the LDAP server is
    enabled in Exchange.

    At any rate searching for Java LDAP gives many hits, including this
    one (which I have just confirmed with our Exchange server):

    Gordon Beaton, Aug 9, 2006
  10. Depending on where the data is stored that you want to access you may
    not even need to access the Exchange server itself.

    let me explain a bit:

    Exchange uses ADS for it's infrastructure. Exchange really only controls
    the storage of your mail, not the configuration of email addresses and
    other things.

    The following is based on personal experience with a project (not my
    senior project that I talk about later) I worked on within the past year
    for my job:
    If you want to let a user access their outlook contacts then you will be
    accessing something on the user's machine, not on the exchange server
    (data from the exchange server is cached in outlook which alleviates the
    need for you to go to the server in that case). This requires MAPI due
    to a patch that Microsoft includes in Office 2000 SP3 (and included in
    Office 2003) that shows a warning message to the user EVERYTIME a
    non-approved application attempts to access the outlook address book
    (due to all those worms a while back that did this unhindered). All
    MAPI apps are already approved to access the outlook address book and so
    that warning will not appear.

    If you need to do the above then you will need a Java API for MAPI and
    as I mentioned in my earlier post, I only know of J-Integra that
    provides that capability.

    On the other hand, if you want to be able to access Exchange's Global
    Address List (and get uncached and up-to-date data) and you want to
    provide your own graphical interface (as in you don't want the Outlook
    address book interface) then you can query the address book information
    yourself. The actual entries are *not* on the exchange server but on the
    active directory server. An Exchange address list is just a LDAP query
    itself that Exchange stores so that you don't have to worry about always
    adding a new user to the list; the query is auto-populated.

    If you formulate your query correctly then you can get all the Contact
    objects or just all objects that have an email address or whatever you
    want. This does not require MAPI and only requires, in your case, a
    Java API that can talk LDAP. JNDI in Java can do this and in fact I have
    written an application (and continue to work on it; it was my senior
    project) that talks with various LDAP directory servers (ADS, OpenLDAP,
    Sun) using the LDAP protocol.

    Based on that, you could do something very similar and provide your own
    GUI. My program hasn't been publicly released and I don't expect to be
    until the first of the year (fully functional but I'm adding a bunch of
    features I want in before it goes public).

    Decide what data you need first and how you want to present it. This
    will dictate whether an API (such as JNDI) is already out there or if
    you need to license one.

    Brandon McCombs, Aug 16, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.