How to configure and use EWS Impersonation on Exchange 2010/2007?

We can refer to the below mentioned articles for configuring and using EWS impersonation for the Exchange 2010:

And here are the links for configuring and using EWS impersonation for the Exchange 2007:

Hope this helps!!!