Introduction

4D-Exchange

a component for 4D version 18 and newer
to communicate with MS Exchange servers or compatible systems
using Exchange Web Services

by

alexander heintz
heintz gmbh kommunikation
am tomborn 59
52223 stolberg
germany

phone: +49 2402 1020407
email: info@heintz.net
website: www.heintz.de

Welcome

With the introduction of the Exchange Server 2007, Microsoft began to migrate from the old and proprietary MAPI communication protocol for its groupware systems to a new system, based on SOAP : Exchange Web Services (EWS). One reason was to open up the communication with its Exchange Servers to any platform or tool in order to compete against more open groupware solutions on the LINUX market that were easier to communicate with than Exchange, mostly due to the lack of available libraries for MAPI communication outside the MS development environments only covering MS Windows OS. Thus EWS is an open protocol, fully documented (well, almost… ok, partly…), for all to use as they see fit to do.

As 4D does “speak” SOAP, it as an obvious match to connect 4D and Exchange.

Sadly the SOAP implementation in 4D was (and still is) quite lacking and was not up to the Task. Especially the modification of the SOAP envelope headers and the required authentication protocol (NTLM) required the use of external tools.

Nonetheless, a first version of an Exchange component was written using Pluggers excellent NTK communication plugin, but since Microsoft changed the authentication system to require NTLM in Version 2010 of Exchange, this solution no longer worked.

Help comes (again) from a very valued member of the 4D community: Keisuke wrapped the curl Library into a plugin and tus made all kinds of communication possible, even cross-platform. Using the curl plugin from Keisuke, the Exchange communication was again possible, as curl takes care of all the authentication, including NTLM.

So here is the component to connect 4D and MS Exchange.

For now it only exposes some of the possible functionality, that which is required for the most important communication sections: calendar; tasks; contacts; folders and e-mail.

WARNING

Using Exchange Web Services you have the same permissions as the user you are authenticating as, so you can potentially wreak havoc in that users Exchange store, so code responsibly!
We, of course, deny any responsibility for what you do with this tool, we only provide it, you pull the trigger so to say…