EWS Java API - GetRooms returning empty set.
Hi, We have EWS servers (2007 SP1 and 2010) which is manage by the Java EWS API. We are trying to execute the following code: ExchangeService service = new ExchangeService( ExchangeVersion.Exchange2010_SP1 ); service.setUrl( new URI(String.format(EWS_SERVICE_ENDPOINT, serviceHostName)) ); service.setCredentials( new WebCredentials(username, password, domain) ); EmailAddressCollection rooms = service.getRoomLists(); System.out.println( rooms.getCount() ); But it always return empty list even if there are rooms when we login through the OWA panel and try to create and appointment with resources. Are we missing any setting/configuration in the server? What could be possible reason and a valid solution to solve this issue?
July 19th, 2012 9:08am

Hi, I hope you don't have Exchange 2007 SP1 and Exchange 2010 in the same ORG. That is not a supported configuration. Not to mention that SP1 isn't supported anymore. Anyway.... I suggest that you post your question in the DEV Forum. Development Forum Topics discussed include: Web services, APIs, application conversion and apps in general Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 11:28am

Hi Martina, No, they are separate servers and the Java API is used to invoke API on both these servers. This seems more like a Server configuration issue since when I enable debug mode in Java API, I can see the ews service returning a response with the GetRoomsList empty. See the XML below: Input XML to the server: <?xml version='1.0' encoding='utf-8'?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"> <soap:Header> <t:RequestServerVersion version="Exchange2010_SP1"/> </soap:Header> <soap:Body> <m:GetRoomLists/> </soap:Body> </soap:Envelope> Response from the server: <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <h:ServerVersionInfo MajorVersion="14" MinorVersion="1" MajorBuildNumber="355" MinorBuildNumber="2" Version="Exchange2010_SP1" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <GetRoomListsResponse ResponseClass="Success" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ResponseCode>NoError</ResponseCode> <m:RoomLists xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"/> </GetRoomListsResponse> </s:Body> </s:Envelope> But when I login through the browser and create an appointment, I can select resources/rooms from a list. I believe this is not an issue with the Java EWS API library, but an issue on the EWS server.
July 19th, 2012 11:42am

Repost that in the DEV Forum where it belongs and where the chance that you get an answer is so much bigger. Good Luck!Martina Miskovic
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 11:45am

Ok. Will do so. Thanks.
July 19th, 2012 11:47am

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

Other recent topics Other recent topics