It’s difficult to even grasp the number of ways you can access your mailbox with Exchange Server 2003. If you can get an administrator to let you install code on the server, you can use Collaborative Data Objects for Exchange (CDOEX), or the OLE DB provider for Exchange (EXOLEDB). You can use the Outlook Object Model (OOM) from the desktop, but not on the server. You can use WebDAV from anywhere, if it was enabled and available through your company’s firewalls. You can use MAPI too, if you were a strong programmer and liked C/C++. But only WebDAV is directly supported in .NET managed code. Many of the other development technologies are only supported by using a COM interop assembly. And the only way to deal with Microsoft Office Outlook® tasks is through OOM.
Welcome to the new world, my friends. Exchange 2007 will make you stand up and cheer. Yes, cheer. Right there in your cubicle. Exchange Web Services is here to put a stop to all that API confusion and difficulty. Your administrator won’t let you install code on the Exchange server? Then don’t run it on the Exchange server. Need to write applications that run on non-Microsoft platforms or languages? You can do that with Exchange Web Services. Want to work with Tasks as well as Contacts and messages and calendar items? You can do that too. Want your application to work from the Internet as it does inside the network? Want to write applications that receive notifications from the server instead of having to constantly poll for status? Want to have Exchange figure out FOR YOU which mailbox server the user should connect to? Want easier access to user’s free/busy information? Yes, the new Web services were built with you in mind.
The new Web services that ship in Exchange 2007 are provided in two minor parts (Autodiscover and Unified Messaging), and one big part (Exchange Web Services, or EWS).
The Autodiscover Web service is extremely important if your application will have to get information from anything but the smallest Exchange deployments. Indeed, we recommend always using the Autodiscover Web service. By supplying the user’s e-mail address to a standardized URL within your organization or Internet domain, the Autodiscover service returns the URLs to servers that your application should use to access that user’s mailbox. One simple call, choose the proper URL, and your application can get to the right server for that user. Almost TOO easy.
Exchange 2007 has many features that are intended to solidly combine e-mail with voice mail and mobile devices. One key feature of this enables the Exchange server to play a voice mail message that is stored in your mailbox on your phone. The Unified Messaging Web service enables your client application to read and change the settings for the play-on-phone features, and to initiate a phone call to do that.
But, the largest and most powerful Web service in Exchange 2007 is Exchange Web Services. Developers should use this API whenever possible. Migrate your applications to it, and definitely build them on it if at all possible. It doesn’t have to be run on the Exchange server; it’s possible to access it from the Internet, and you can access the new organizational folders. And yes, you can finally manage Tasks!
One part of Exchange Web Services that your applications may have been screaming for is notifications. By using Exchange Web Services you can subscribe as either a push- or a pull-client. If you’re using the pull method, your application can poll Exchange and get the list of changes that have occurred in the subscribed folder. To use push notifications, your application implements and registers a small Web service, and Exchange calls it when necessary.
EWS is poised to become the favored way to get to mailbox data for the future, so if you’re not up on programming for Web services, now’s the time to learn. The RTM SDK will provide lots of information to get you started. As always, be sure to tell us where we can improve both the documentation and the APIs.
If Web services won’t do what you need, there’s still MAPI and the older COM-based APIs. But, those might be gone in the next major version of Exchange, so don’t expect them to be around forever. No final decisions have been made, but programming against COM interfaces that can’t even be used under managed code is going the way of Windows 95.