Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A SOAP message that will retrieve a list of rooms in a roomlist from Exchange 2010.
// given the e-mail address of a roomlist, this SOAP message will retrieve the member rooms.
NSString *roomlist = @"roomlist1@domain.tld" // this is the e-mail address of the room list you're querying
NSLog(@"querying roomlist %@", roomlist);
NSString *soapMessage = [NSString stringWithFormat:@""
@"<?xml version=\"1.0\" encoding=\"utf-8\"?>"
@"<soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\" xmlns:m=\"http://schemas.microsoft.com/exchange/services/2006/messages\">"
@"<soap:Header>"
@"<t:RequestServerVersion Version =\"Exchange2010_SP2\"/>"
@"</soap:Header>"
@"<soap:Body>"
@"<m:GetRooms>"
@"<m:RoomList>"
@"<t:EmailAddress>%@</t:EmailAddress>"
@"</m:RoomList>"
@"</m:GetRooms>"
@"</soap:Body>"
@"</soap:Envelope>"
@"", roomlist];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment