locked
Exchange Server 2010 not generating ExchangeServiceBinding proxy class in Visual studio 2010 RRS feed

  • Question

  • Hi Guys,

    Presently I am working on application that needs to fetch data from Exchange server 2010. If I add Service reference in Visual studio 2010 using url  https://myServer/ews/exchange.asmx, the service reference is not generating "ExchangeServiceBinding" class. How to proceed with this? And since I am doing this in windows 8 metro and Wp7, I am not able to use managed api dll. Please help me guys.

    Monday, February 25, 2013 1:54 PM

Answers

All replies

  • It should show. There is no reason it's not if you're adding web reference correctly.

    How about trying to browse web service https://myServer/ews/exchange.asmx thru IE? Are you able to and will you see all operations?

    Monday, February 25, 2013 5:04 PM
  • I browsed  web service https://myServer/ews/exchange.asmx it has generated 

    <wsdl:binding name="ExchangeServiceBinding" type="tns:ExchangeServicePortType">
    <wsdl:documentation>
    <wsi:Claim xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/" conformsTo="http://ws-i.org/profiles/basic/1.0"/>
    </wsdl:documentation>

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

    But I am not able to use in C# classes. Its always an redmark below When you write ExchangeServiceBinding.


    • Edited by nucleons Tuesday, February 26, 2013 9:50 AM
    Tuesday, February 26, 2013 6:54 AM
  • did you use the namespace correctly?

    Tuesday, February 26, 2013 10:52 PM
  • Yes, But we can only use ExchangeServicePortTypeClient object. And I also found this article http://social.msdn.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1a312bdd-022d-4ee8-803b-082da6528d4d/. 
    Wednesday, February 27, 2013 5:21 AM
  • In your original post you say you added it as a Service Reference ? you need to add this as a Web Reference as EWS isn't a WCF service there is a step by step example at http://msdn.microsoft.com/en-us/library/exchange/bb408520(v=exchg.140).aspx which shows how you can get to the Add Web Reference via the Advanced button.

    cheers
    Glen

    Wednesday, February 27, 2013 5:24 AM
  • There is no Add webreference via the Advanced button in windows 8 metro or wp7 projects?

    • Edited by nucleons Wednesday, February 27, 2013 9:12 AM
    Wednesday, February 27, 2013 9:09 AM
  • If this is new project, why not use EWS Managed API 2.0?

    Wednesday, February 27, 2013 2:37 PM
  • You possibly need to right click on your service reference and update.

    I know i have done this in one  of my projects, it has worked for me, it should work for you.

    Wednesday, February 27, 2013 2:42 PM
  • Okay sorry afaik on Windows Phone 7 and Metro you can't use Proxy Objects from a asmx web service http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/59fa422b-5604-48d9-a63f-04b404d5cc3a only WCF is supported. So you need to use Raw soap for communicating with EWS on these platforms.

    Cheers
    Glen


    • Marked as answer by nucleons Thursday, February 28, 2013 4:49 AM
    • Edited by Glen ScalesMVP Thursday, February 28, 2013 5:12 AM updated link
    Wednesday, February 27, 2013 11:02 PM
  • The link you provided is not found, please update the link.
    • Edited by nucleons Thursday, February 28, 2013 4:50 AM
    Thursday, February 28, 2013 4:50 AM
  • Thanks guys for all your replies.

    I am using raw soap calls. Here are good links to get started

    http://blogs.msdn.com/b/emeamsgdev/archive/2011/09/13/soap-test-application.aspx

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


    Happy coding.
    • Edited by nucleons Friday, March 1, 2013 9:40 AM
    Friday, March 1, 2013 9:38 AM