Search code examples
web-servicessoapoutlookwsdl

Outlook.com WSDL has no service element


I'm trying to write a client for Outlook.com mail. I've successfully connected and authenticated, and downloaded the WSDL. However, the WSDL has no service element, which the specification requires.

I dutifully checked all the imports per the question "wsdl has no service element" even though they're called messages.xsd and types.xsd, and found no service elements.


Solution

  • This page on Google Code describes the issue.

    The service element is missing, presumably so they can distribute a single Services.wsdl that will work on all servers without having to customize it. I'm not sure of the reasoning.

    The net effect is that you have to add the element yourself to the end of the file:

    ...
    
       <wsdl:service name="ExchangeServices">
         <wsdl:port name="ExchangeServicePort" binding="tns:ExchangeServiceBinding">
           <soap:address location="https://my.exchange.com/EWS/Exchange.asmx"/>
         </wsdl:port>
       </wsdl:service>
    
    </wsdl:definitions>