Introduction
Exchange 2007 introduced a new programming model by using Web Services. The API is called Exchange Web Services (EWS). The new programming model is easy to use, have a nice documentation in the SDK, and also nice learning curve.
Notifications
Notification is an event raised when a specific activity occur to specific resource in the Exchange. The most obvious situation when you want to monitor a specific Mail Box.
Exchange have two methods of notifications, you can consider it like passive and active notifications:
1) Pull Notifications (Passive Approach): You build your application so that it asks the exchange every period of time about any events occurred to the desired resource.
2) Push Notifications (Active Approach): Exchange will notify you about changes that has been occurred and send the notification to your application via custom Web Service (your web service that you built.).
Either (Pull or Push) Notifications require you to Subscribe the required Events so that Exchange can generate the desired notifications which will be sent to your application.
EWS Programming and Types
EWS is differentiate between two types of Resources Folder, and Item
Item could be Message, Contact, Task, etc…
So Notification in this sample is monitoring INBOX folder
Programming against EWS is done by Request and Response.
You create the (Request) then using ExchangeBindingService you send the request and return the (Response) which you test its success or not.
Motivation
Push notification sample included in the SDK have subscriber project and client web service project to consume the exchange notifications.
Thinking that you may not have IIS installed or thinking that you have to build a web service to be a bridge between your application and exchange notification made me not comfortable about the situation.
EWS is using SOAP messages all the day. So I figured out that using WCF service will be a nice feature to interact with the notifications.
WCF service could be hosted in any application and it gives you the integrity to the rest of pieces of your software.
the remain of the article and the sample is in http://www.codeproject.com/useritems/Exchange_2007_with_WCF.asp in codeproject
however exchange was a nice experience 😉
Hi,
Very good article. This is what i am looking for from many days.
Can i get code for PUSH Notification.
Thanks in Advance,
Vee
hi, thanks,The article was very well written, very helpful to me
Very thankful to the author its really helped me to understand the push/pull notifications in simpler way..
Regards,
KasiRaju.