title: How to setup new SOAPUI project to Office 365 Exchange (trouble accessing WSDL)
body: <p>I'm trying to create a new <a href="http://www.soapui.org/" rel="nofollow noreferrer">SoapUI</a> project for testing against Exchange Web Services in Office 365.</p>
  
  <p>Attempt 1)</p>
  
  <p>For the initial WSDL I specify <a href="https://outlook.office365.com/ews/services.wsdl" rel="nofollow noreferrer">https://outlook.office365.com/ews/services.wsdl</a>.</p>
  
  <p>SoapUI then prompts me for Basic Authentication for <code>outlook.office365.com:443</code><br />
  If I enter the credentials that I use to login to Office365, this fails.</p>
  
  <p>The login screen then comes back asking for Basic Authentication for <code>outlook.office365.com:-1</code></p>
  
  <p>Attempt 2)</p>
  
  <p>Then I found this detailed guide <a href="http://blog.skysoft-is.com/?p=78" rel="nofollow noreferrer">How to get services.wsdl for Office 365?</a>:
  Using the <a href="https://testconnectivity.microsoft.com/" rel="nofollow noreferrer">Microsoft Remote Connectivity Analyzer</a> I could extract <code>https://pod51046.outlook.com/ews/exchange.asmx</code><br />
  So I next tried that, but then SoapUI responds:</p>
  
  <pre><code>"There was something wrong with the WSDL you are trying to import"
  Error loading [https://pod51046.outlook.com/ews/exchange.wsdl]: org.apache.xmlbeans.XmlException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
  </code></pre>
  
  <p>SoapUI Log says:</p>
  
  <pre><code>Tue Oct 14 13:35:48 CEST 2014:DEBUG:Getting wsdl component from [https://pod51046.outlook.com/ews/exchange.wsdl]
  Tue Oct 14 13:35:48 CEST 2014:INFO:pod51046.outlook.com:443 requires authentication with the realm 'null'
  Tue Oct 14 13:36:14 CEST 2014:ERROR:Failed to load url [https://pod51046.outlook.com/ews/exchange.wsdl]
  Tue Oct 14 13:36:14 CEST 2014:ERROR:An error occurred [com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException], see error log for details
  </code></pre>
  
  <p>HTTP log says:</p>
  
  <pre><code>Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "GET /ews/exchange.wsdl HTTP/1.1[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "Host: pod51046.outlook.com[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "Connection: Keep-Alive[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "Cookie: ClientId=LGJVIJZECEJQYUIHP0RW; X-BackEndCookie=jan@[snip].onmicrosoft.com=u56Lnp[snip]Fys0=; exchangecookie=0fe18[snip]ad43d[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "Cookie2: $Version=1[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&gt;&gt; "[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "HTTP/1.1 401 Anonymous Request Disallowed[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "Server: Microsoft-IIS/8.0[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "request-id: fadbe60a-008b-4f16-859a-719aaa8794bc[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-WSSecurity-Enabled: True[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-WSSecurity-For: Logon[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-FederationTrustTokenIssuerUri: urn:federation:MicrosoftOnline[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-WSSecurity-SymmetricKey-Enabled: True[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-WSSecurity-X509Cert-Enabled: True[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-OAuth-Enabled: True[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-Powered-By: ASP.NET[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "X-FEServer: AM2PR02CA0041[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "WWW-Authenticate: Basic Realm=""[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "Date: Tue, 14 Oct 2014 11:35:55 GMT[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "Content-Length: 0[\r][\n]"
  Tue Oct 14 13:35:48 CEST 2014:DEBUG:&lt;&lt; "[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "GET /ews/exchange.wsdl HTTP/1.1[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "Host: pod51046.outlook.com[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "Connection: Keep-Alive[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "Cookie: ClientId=LGJVIJZECEJQYUIHP0RW; X-BackEndCookie=jan@[snip].onmicrosoft.com=u56Lnp2ejJ[snip]vFys0=; exchangecookie=0fe1867420a243b5993d336bbbead43d[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "Cookie2: $Version=1[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "Authorization: Basic amFuQFR[snip]RCVg==[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&gt;&gt; "[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "HTTP/1.1 404 Not Found[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "Cache-Control: private[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "Server: Microsoft-IIS/8.0[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "request-id: 0bdf26cb-0fe3-418e-816f-a07324900119[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-CalculatedBETarget: db3pr02mb203.eurprd02.prod.outlook.com[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-DiagInfo: DB3PR02MB203[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-BEServer: DB3PR02MB203[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-AspNet-Version: 4.0.30319[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "Set-Cookie: X-BackEndCookie=jan@[snip].onmicrosoft.com=u56Lnp2ejJqBy[snip]7FzMnFzc4=; expires=Thu, 13-Nov-2014 11:36:21 GMT; path=/ews; secure; HttpOnly[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-Powered-By: ASP.NET[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "X-FEServer: AM2PR02CA0041[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "Date: Tue, 14 Oct 2014 11:36:20 GMT[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "Content-Length: 0[\r][\n]"
  Tue Oct 14 13:36:14 CEST 2014:DEBUG:&lt;&lt; "[\r][\n]"
  </code></pre>
  
  <p>Error log says:</p>
  
  <pre><code>Tue Oct 14 13:36:14 CEST 2014:ERROR:com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
  com.eviware.soapui.impl.support.definition.support.InvalidDefinitionException
  at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.makeInvalidDefinitionException(WsdlLoader.java:142)
  at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:129)
  at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:539)
  at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:528)
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:101)
  at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:240)
  at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:50)
  at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:153)
  at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Attempt 3)</p>
  
  <p>If I put <code>https://pod51046.outlook.com/ews/exchange.wsdl</code> into the IE address bar it keeps prompting me for a login in IE.<br />
  That repeated prompting is mentioned in a comment here: <a href="https://stackoverflow.com/questions/21690574/how-to-access-a-wsdl-url-in-soapui-which-recquires-username-password">How to access a wsdl URL in SoapUI, which requires username/password?</a>, but after 3 logins (each time telling IE to remember my references) the returned page is blank:</p>
  
  <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
  &lt;HTML&gt;&lt;HEAD&gt;
  &lt;META content="text/html; charset=windows-1252" http-equiv=Content-Type&gt;&lt;/HEAD&gt;
  &lt;BODY&gt;&lt;/BODY&gt;&lt;/HTML&gt;
  </code></pre>
  
  <p>I'm using the free SOAPUI 5.0.0 (latest version), with Java 7 (then 8) in a Win7/64 environment.
  I have also cloned my VM and tried the SOAPUI Pro version as suggested in <a href="https://stackoverflow.com/questions/20660192/to-create-a-soapui-project-using-a-wsdl">To create a SOAPUI project using a wsdl</a>, but this did not help.</p>
  
  <p><strong>Any suggestions how to get this to work?</strong></p>