EWS client built for Exchange 2007 no longer working since moving to Exchange 2013

Hello, 

I have an EWS client built in JAVA which calls the GetUserAvailability and CreateItem operations. SOAP requests are sent over HTTPS. A service account is supplied which satisfies authentication challenges.

The client was built against Exchange Server 2007. Now the infrastructure is moving to Exchange 2013. Initially testing has surfaced an issue connecting and fetching FREEBUSY data from Exchange 2013. 

Exchange 2013 returns a 400 exception when I attempt to fetch FREEBUSY data for an existing mailbox. The same client returns data when pointed against the 2007 server. 

Can someone advise if the SOAP request for Exchange 2013 requires some additional header information ( compared to 2007 request)? 

Including a copy of the request i send incase someone sees something which i should change

<?xml version="1.0" encoding="utf-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
	<SOAP-ENV:Body xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
		<GetUserAvailabilityRequest xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
			<TimeZone xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
				<Bias>0</Bias>
				<StandardTime>
					<Bias>0</Bias>
					<Time>01:00:00</Time>
					<DayOrder>4</DayOrder>
					<Month>10</Month>
					<DayOfWeek>Sunday</DayOfWeek>
				</StandardTime>
				<DaylightTime>
					<Bias>0</Bias>
					<Time>01:00:00</Time>
					<DayOrder>4</DayOrder>
					<Month>3</Month>
					<DayOfWeek>Sunday</DayOfWeek>
				</DaylightTime>
			</TimeZone>
			<MailboxDataArray>
				<MailboxData xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
					<Email>
						<Name/>
						<Address>adress@example.com</Address>
						<RoutingType>SMTP</RoutingType>
					</Email>
					<AttendeeType>Required</AttendeeType>
					<ExcludeConflicts>false</ExcludeConflicts>
				</MailboxData>
			</MailboxDataArray>
			<FreeBusyViewOptions xmlns="http://schemas.microsoft.com/exchange/services/2006/types">
				<TimeWindow>
					<StartTime>2015-08-29T14:00:00.000Z</StartTime>
					<EndTime>2015-08-29T16:00:00.000Z</EndTime>
				</TimeWindow>
				<MergedFreeBusyIntervalInMinutes>30</MergedFreeBusyIntervalInMinutes>
				<RequestedView>FreeBusy</RequestedView>
			</FreeBusyViewOptions>
		</GetUserAvailabilityRequest>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

 


June 29th, 2015 7:35pm

**Update: I've tested this request in both Fiddler and EWS Editor and it succeeds on both platforms. The request headers, content type etc all look the same. Is it possible that Fiddler and EWS Editor are able to handler redirects which may be happening when i hit the load balanced URL?

The response is include below; It's not a SOAP response just HTTP 400. 

The exact request works when using the EWS Editor but not through my HTTPClient (which successfully sends/receives 2007 requests)

I also receive the following message when initially setting up the EWS Editor - The mailbox that was requested doesn't support the specified RequestServerVersion

Exception details:
Message: The mailbox that was requested doesn't support the specified RequestServerVersion.
Type: Microsoft.Exchange.WebServices.Data.ServiceResponseException
Source: Microsoft.Exchange.WebServices
ErrorCode: ErrorInvalidSchemaVersionForMailboxVersion
ErrorMessage: The mailbox that was requested doesn't support the specified RequestServerVersion.

30-Jun-2015 09:33:39 com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 1 * Client in-bound response
1 < 400
1 < Cache-Control: private
1 < Server: Microsoft-IIS/8.0
1 < request-id: bbe********************************
1 < X-CalculatedBETarget: msg******.somedoamin.com
1 < X-DiagInfo: MSG**********
1 < X-BEServer: MSG**********
1 < X-AspNet-Version: 4.0.30319
1 < Set-Cookie: exchangecookie=*************************; expires=Thu, 30-Jun-2016 08:33:40 GMT; path=/; HttpOnly
1 < Set-Cookie: X-BackEndCookie=*********************; expires=Thu, 30-Jul-2015 12:33:40 GMT; path=/ews; secure; HttpOnly
1 < Persistent-Auth: true
1 < X-Powered-By: ASP.NET
1 < X-FEServer: MSG******
1 < Date: Tue, 30 Jun 2015 08:33:40 GMT
1 < Content-Length: 0
1 < 



Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 4:42am

**Update: I've tested this request in both Fiddler and EWS Editor and it succeeds on both platforms. The request headers, content type etc all look the same. Is it possible that Fiddler and EWS Editor are able to handler redirects which may be happening when i hit the load balanced URL?

The response is include below; It's not a SOAP response just HTTP 400. 

The exact request works when using the EWS Editor but not through my HTTPClient (which successfully sends/receives 2007 requests)

I also receive the following message when initially setting up the EWS Editor - The mailbox that was requested doesn't support the specified RequestServerVersion

Exception details:
Message: The mailbox that was requested doesn't support the specified RequestServerVersion.
Type: Microsoft.Exchange.WebServices.Data.ServiceResponseException
Source: Microsoft.Exchange.WebServices
ErrorCode: ErrorInvalidSchemaVersionForMailboxVersion
ErrorMessage: The mailbox that was requested doesn't support the specified RequestServerVersion.

30-Jun-2015 09:33:39 com.sun.jersey.api.client.filter.LoggingFilter log
INFO: 1 * Client in-bound response
1 < 400
1 < Cache-Control: private
1 < Server: Microsoft-IIS/8.0
1 < request-id: bbe********************************
1 < X-CalculatedBETarget: msg******.somedoamin.com
1 < X-DiagInfo: MSG**********
1 < X-BEServer: MSG**********
1 < X-AspNet-Version: 4.0.30319
1 < Set-Cookie: exchangecookie=*************************; expires=Thu, 30-Jun-2016 08:33:40 GMT; path=/; HttpOnly
1 < Set-Cookie: X-BackEndCookie=*********************; expires=Thu, 30-Jul-2015 12:33:40 GMT; path=/ews; secure; HttpOnly
1 < Persistent-Auth: true
1 < X-Powered-By: ASP.NET
1 < X-FEServer: MSG******
1 < Date: Tue, 30 Jun 2015 08:33:40 GMT
1 < Content-Length: 0
1 < 



  • Edited by colinduggan Tuesday, June 30, 2015 11:19 AM
June 30th, 2015 8:40am

It sounds your httpclient isn't submitting the request correctly if you getting 400 Bad Request ? is you httpclient doing a POST (or sending an Options instead eg a CORS issue ?). Its looks like your hitting the endpoint okay but not sending the payload through. You can check the EWS log on the CAS server to see if that give you more information

Cheers
Glen

Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 2:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics