EWS has "More Happy" now – EWS Managed API and EWSEditor.


Want to make working with Exchange Web Services (EWS) much easier to work with?  There is a new API and new tool which can help.  No matter which way you are doing or going to be doing EWS calls, you should be familiar with both the Exchange Web Services Managed API and EWSEditor.


 


Exchange Web Services Managed API:


The Exchange Web Services Managed API makes life much easier since it wraps a lot of calling code and logic which is needed to successfully execute EWS calls.  No matter how you are doing EWS calls (pure soap calls, using generated .Net proxies or a third party API that does EWS calls), you should become familiar with this new API which released on Monday with Exchange 2010.  This API will work with both Exchange 2010 and 2007.  This API is a lot easier to use than other coding methods and can reduce code to well under 30% of what’s needed with generated proxy code (my observation).  Compared to WebDAV, you would need to write as little as 1.5% of the code with the EWS Managed API - an example of this is sending a meeting request. Yes, that 1.5% is correct.  As you can see, this new API is indeed the "go-forward" API for working with mailbox content.


 


EWSEditor:


There is a tool called EWSEditor which is written by a member of my team and used by our entire support team.  It’s based-upon the EWS Managed API and is helpful in showing how calls using this API can be used since you can get the source code.  We have been using it since Matt started building his tool using the early Beta of the Managed API in order help diagnose issues on customer’s systems.  Having source code samples when learning a new API is often invaluable, so be sure to get a copy of the source for EWSEditor to use as a reference.   Please check-out Matt’s blog below for more information on his tool and source code.


 


Announcing EWSEditor 1.5!


http://code.msdn.microsoft.com/ewseditor


 


ExchangeWebServices Namespace (generated .NET proxies)


http://msdn.microsoft.com/en-us/library/exchangewebservices.aspx


 


Exchange Web Services Managed API


http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1


 


Introducing the Exchange Web Services Managed API 1.0


http://msdn.microsoft.com/en-us/library/dd637749.aspx


 


Microsoft Exchange Web Services Managed API 1.0


http://msdn.microsoft.com/en-us/library/dd633709.aspx


 


One thing which I would strongly suggest is that if you find that your code does not work, try using EWSEditor to see if you can reproduce the issue.  If the operation you are trying to perform is not covered with EWSEditor, then try to see if the problem reproduces with the EWS Managed API.  EWSEditor & the EWS Managed API have the ability to log off EWS calls being performed.   You can use this logging feature to compare what EWSEditor/The EWS Managed API sends with what your application sends in order to determine where a problem is with your code.


 


Big kudos for…


The Exchange Development Team for creating the EWS Exchange Managed API.


Matt for building EWSEditor and getting it public!!!


 


 


               

Comments (2)

  1. noel23 says:

    Hi,

    I am using the Managed API to retrieve mail messages from an inbox successfully.  Can get most message properties including extended ones like the Body.  Can NOT figure out for the life of me how to get back the From: or To: email addresses.  I can get the display names (message.From.Name and message.DisplayTo.ToString) but message.From.ID and message.ToRecipients are null, message.From.ToString() and message.From.Address are empty.

    I could not find anything like this in the EWSEditor code, and don’t understand the suggestion above "see if the problem reproduces with the EWS Managed API".  Also searching in vain for specifics about "First Class Properties" in the EWS Managed API.

    Any suggestions appreciated.  Thanks!  

  2. nathfy says:

    Noel23 – i was also having problems, but finally sussed out that you get the email addresses out of the ToRecipients collection:

    foreach (EmailAddress email_address in (myItem as EmailMessage).ToRecipients)

                       {

                           sb.Append(email_address.Address + ",");

                       }

Skip to main content