How to set up a new SOAPUI project on Office 365 Exchange (WSDL access issue)

I'm trying to create a new SoapUI project to test Exchange Web Services in Office 365.

Attempt 1)

For the original WSDL, I point to https://outlook.office365.com/ews/services.wsdl .

SoapUI then prompts me for Basic Authentication for outlook.office365.com:443


If I enter the credentials that I use to sign in to Office365 it doesn't work.

Then the login screen comes back asking for basic authentication for outlook.office365.com:-1

Attempt 2)

Then I found this detailed guide How do I get services.wsdl for Office 365? : Using Microsoft Remote Connectivity Analyzer I could extract https://pod51046.outlook.com/ews/exchange.asmx


So I tried this, but then SoapUI responds:

"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

      

SoapUI Log says:

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

      

The HTTP protocol says:

Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "GET /ews/exchange.wsdl HTTP/1.1[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "Host: pod51046.outlook.com[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "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:>> "Cookie2: $Version=1[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:>> "[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "HTTP/1.1 401 Anonymous Request Disallowed[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "Server: Microsoft-IIS/8.0[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "request-id: fadbe60a-008b-4f16-859a-719aaa8794bc[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-WSSecurity-Enabled: True[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-WSSecurity-For: Logon[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-FederationTrustTokenIssuerUri: urn:federation:MicrosoftOnline[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-WSSecurity-SymmetricKey-Enabled: True[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-WSSecurity-X509Cert-Enabled: True[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-OAuth-Enabled: True[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "X-FEServer: AM2PR02CA0041[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "WWW-Authenticate: Basic Realm=""[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "Date: Tue, 14 Oct 2014 11:35:55 GMT[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "Content-Length: 0[\r][\n]"
Tue Oct 14 13:35:48 CEST 2014:DEBUG:<< "[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "GET /ews/exchange.wsdl HTTP/1.1[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "Host: pod51046.outlook.com[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "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:>> "Cookie2: $Version=1[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "Authorization: Basic amFuQFR[snip]RCVg==[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:>> "[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "HTTP/1.1 404 Not Found[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "Cache-Control: private[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "Server: Microsoft-IIS/8.0[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "request-id: 0bdf26cb-0fe3-418e-816f-a07324900119[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "X-CalculatedBETarget: db3pr02mb203.eurprd02.prod.outlook.com[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "X-DiagInfo: DB3PR02MB203[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "X-BEServer: DB3PR02MB203[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "X-AspNet-Version: 4.0.30319[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "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:<< "X-Powered-By: ASP.NET[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "X-FEServer: AM2PR02CA0041[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "Date: Tue, 14 Oct 2014 11:36:20 GMT[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "Content-Length: 0[\r][\n]"
Tue Oct 14 13:36:14 CEST 2014:DEBUG:<< "[\r][\n]"

      

The error log says:

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)

      

Attempt 3)

If I put https://pod51046.outlook.com/ews/exchange.wsdl

IE in the address bar it keeps asking me to login to IE.
This repetition of the hint is mentioned here in a comment: How do I access a wsdl url in SoapUI that requires a username / password? but after 3 logins (every time IE remember my links) the returned page is empty:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type></HEAD>
<BODY></BODY></HTML>

      

I am using free SOAPUI 5.0.0 (latest version), with Java 7 (then 8) on Win7 / 64 environment. I also cloned my VM and tried the SOAPUI Pro version suggested in to create a SOAPUI project using wsdl , but that didn't help.

Any suggestions how to get this to work?

+3


source to share


1 answer


The correct URL used for Office 365 EWS WSDL is the first one you tried: https://outlook.office365.com/ews/services.wsdl . You must use this URL to get the WSDL. From the browser, when I enter my email and password, I can get the WSDL with no problem.

I'm not familiar with SOAPUI, so I don't know why this URL + Basic auth doesn't work with SOAP interface. Let me know if you have questions or need more information.

[Additional notes from OP]



Thanks Venkat, that was the solution. There were additional complications why I didn't get it right in the first place. I write them in the answer because they are too many to comment.

  • I accidentally entered https://pod51046.outlook.com/ews/***exchange***.wsdl

    instead https://pod51046.outlook.com/ews/***services***.wsdl

    (which Oleg did mention a blog about and I forgot). This gave correct results immediately in IE. Your suggestion to introduce generic https://outlook.office365.com/ews/services.wsdl

    also works.
    (I think after reading somewhere that the actual url is pod...

    one, I persisted in trying that one for its permission).
    This is why attempts 2 and 3 have failed.

  • SOAP UI asks me 2 times 3 = 6 times for login credentials when setting up a test project. I just wasn't tough enough.
    And that's why Attempt 1 failed.

+3


source







All Articles