JanDoggen
11 years agoOccasional Contributor
How to setup new project to Office 365 Exchange
I'm trying to create a new project for testing against Exchange web services in Office 365.
Attempt 1)
For the Initial WSDL I specify 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 login to Office365, this fails.
The login screen then comes back asking for Basic Authentication for outlook.office365.com:-1
Attempt 2)
Then I found this detailed guide: http://blog.skysoft-is.com/?p=78
Using the Microsoft Remote Connectivity Analyzer at https://testconnectivity.microsoft.com/
I could extract https://pod51046.outlook.com/ews/exchange.asmx
So I next tried https://pod51046.outlook.com/ews/exchange.wsdl
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 nul
SoapUI Log says:
HTTP log says:
Error log says:
If I put https://pod51046.outlook.com/ews/exchange.wsdl (or https://outlook.office365.com/ews/services.wsdl) into the IE address bar it keeps prompting me for a login in IE.
Additional:
If I try to ignore all this (maybe I don't need to poll the WDSL) and set up a teststep, I get this when executing it:
This is that teststep:
Any suggestions?
(Using SoapUI 5.0.0)
Attempt 1)
For the Initial WSDL I specify 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 login to Office365, this fails.
The login screen then comes back asking for Basic Authentication for outlook.office365.com:-1
Attempt 2)
Then I found this detailed guide: http://blog.skysoft-is.com/?p=78
Using the Microsoft Remote Connectivity Analyzer at https://testconnectivity.microsoft.com/
I could extract https://pod51046.outlook.com/ews/exchange.asmx
So I next tried https://pod51046.outlook.com/ews/exchange.wsdl
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 nul
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
HTTP log 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 amFuQFRpbWVUZWxsQlY1Njcub25taWNyb3NvZnQuY29tOnJ1NHJlYWxfYXRfVFRCVg==[\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]"
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)
If I put https://pod51046.outlook.com/ews/exchange.wsdl (or https://outlook.office365.com/ews/services.wsdl) into the IE address bar it keeps prompting me for a login in IE.
Additional:
If I try to ignore all this (maybe I don't need to poll the WDSL) and set up a teststep, I get this when executing it:
HTTP/1.1 401 Anonymous Request Disallowed
Server: Microsoft-IIS/8.0
request-id: e07d6022-caf3-4b20-addc-1369b46fdfcf
X-Powered-By: ASP.NET
X-FEServer: AMSPR02CA0027
WWW-Authenticate: Basic Realm=""
Date: Tue, 14 Oct 2014 12:22:37 GMT
Content-Length: 0
This is that teststep:
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://schemas.microsoft.com/exchange/services/2006/messages/UpdateInboxRules"/></con:call></con:operation><con:operation isOneWay="false" action="http://schemas.microsoft.com/exchange/services/2006/messages/UpdateItem" name="UpdateItem" bindingOperationName="UpdateItem" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://webmail.timetellbv.nl/ews</con:endpoint><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://schemas.microsoft.com/exchange/services/2006/messages/UpdateItem"/></con:call></con:operation><con:operation isOneWay="false" action="http://schemas.microsoft.com/exchange/services/2006/messages/UpdateItemInRecoverableItems" name="UpdateItemInRecoverableItems" bindingOperationName="UpdateItemInRecoverableItems" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false"><con:settings/></con:operation><con:operation isOneWay="false" action="http://schemas.microsoft.com/exchange/services/2006/messages/UpdateUserConfiguration" name="UpdateUserConfiguration" bindingOperationName="UpdateUserConfiguration" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false"><con:settings/></con:operation><con:operation isOneWay="false" action="http://schemas.microsoft.com/exchange/services/2006/messages/UploadItems" name="UploadItems" bindingOperationName="UploadItems" type="Request-Response" inputName="" receivesAttachments="false" sendsAttachments="false"><con:settings/></con:operation></con:interface><con:testSuite name="TestSuite"><con:settings/><con:runType>SEQUENTIAL</con:runType><con:testCase failOnError="true" failTestCaseOnErrors="true" keepSession="false" maxResults="0" name="TestCases" searchProperties="true"><con:settings/><con:testStep type="request" name="Resolve names"><con:settings/><con:config xsi:type="con:RequestStep" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:interface>ExchangeServiceBinding</con:interface><con:operation>FindItem</con:operation><con:request name="Resolve names"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers"><entry key="Content-Type" value="text/xml; charset=utf-8" xmlns="http://eviware.com/soapui/config"/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>https://pod51046.outlook.com/ews/exchange.asmx</con:endpoint><con:request><![CDATA[<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:typ="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns:mes="http://schemas.microsoft.com/exchange/services/2006/messages">
<soapenv:Header>
<typ:RequestServerVersion Version="Exchange2007_SP1"/>
</soapenv:Header>
<soapenv:Body>
<mes:ResolveNames ReturnFullContactData="1" SearchScope="ActiveDirectoryContacts">
<mes:UnresolvedEntry>timetell</mes:UnresolvedEntry>
</mes:ResolveNames>
</soapenv:Body>
</soapenv:Envelope>
]]></con:request><con:credentials><con:username>jan</con:username><con:password>[snip]</con:password><con:domain>[snip].onmicrosoft.com</con:domain><con:selectedAuthProfile>NTLM</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>NTLM</con:addedBasicAuthenticationTypes><con:authType>NTLM</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508"/><con:wsrmConfig version="1.2"/></con:request></con:config></con:testStep><con:properties/></con:testCase><con:properties/></con:testSuite><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/></con:soapui-project>
Any suggestions?
(Using SoapUI 5.0.0)