Avatar of dantheanswerman
dantheanswerman
Flag for United States of America asked on

How can I create the ews.dll

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?
Exchange.NET Programming

Avatar of undefined
Last Comment
Robberbaron (robr)

8/22/2022 - Mon
Robberbaron (robr)

ASKER CERTIFIED SOLUTION
Robberbaron (robr)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
dantheanswerman

ASKER
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"
dantheanswerman

ASKER
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 ;-).
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Robberbaron (robr)

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.