How can I create the ews.dll

dantheanswerman
dantheanswerman used Ask the Experts™
on
I am trying to create an Exchange server (Outlook) interface to allow me to send emails, view contacts, create and read appointments from C#. Web references are telling me to create an ews.dll from the Exchange Web Server (EWS) API utilizing the wsdl.exe tool (from the command prompt.) -- see article below walks through the steps very nicely, but I don't know where to get the wsdl referenced in the URL below:

http://blogs.msdn.com/b/exchangedev/archive/2007/12/07/generating-exchange-web-services-proxy-classes.aspx 

Please help me.. got to the command prompt, but can't figure out where this wsdl is that they reference in the article?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
OK... finally figured it out:
Hope this saves someone else some pain ... I had deployed the SDK for the EWS API.
You must run the command prompt as administrator, and run the "//Mine" statements (below) in the command prompt with your file links (this is a WinForms env, so there are no web links, but instead physical paths:

//Original (Sample Code - this is what I started with from link in original question)
wsdl /language:cs /out:EWS.cs /namespace:ExchangeWebServices https://MyCAServer.Domain.com/ews/services.wsdl

 ** RUN Command prompt (VS2010 in my case) as Admin or it will not create the file!!
***Note: Three (3) Files are passed to the wsdl.exe - Services.wsdl, messages.xsd, & types.xsd. You must specify the output file path for: "ews.cs" - this file is then used (in the following command line script to create the dll.

//Mine (Code that was run in the command prompt)
wsdl "C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\Samples\PushNotification\PushNotificationSubscriber\Web References\EWSReference\Services.wsdl" "C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\Samples\PushNotification\PushNotificationSubscriber\Web References\EWSReference\messages.xsd" "C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\Samples\PushNotification\PushNotificationSubscriber\Web References\EWSReference\types.xsd" /language:cs /out:"C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\EWS.cs"  /namespace:ExchangeWebServices

//Original (Sample Code - uses the csc compiler)
csc /target:library /out:EWS.dll EWS.cs

//Mine  (Code that was run in the command prompt -- again **RUN AS Admin!!)

csc /target:library /out:"C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\ews.dll" "C:\Program Files (x86)\Microsoft\Exchange Server 2010 SP2\Web Services SDK September 2011\EWS.cs"

Author

Commented:
This was not exactly the answer to the question... but I appreciate the effort... the Exchange Web Services (EWS) API 1.2 released in Feb 2012 is so poorly documented... everything I try seems to work for the samples provided, but tough for me to use the way I want.. I'm still fighting it.. see my solution below to my question. HALLLELLLUIAAA!!! Finally got it ;-).
i agree that the m$ docs are not great but there are a lot of useful examples around for M-EWS,

see http://www.infinitec.de/ by Henning Krause which i found very useful for my tasks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial