4 Protocol Examples
The following example of a FindPeople WSDL operation request shows how to return all contacts (2) from the Contacts folder.
-
<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:tns="http://schemas.microsoft.com/exchange/services/2006/messages"> <soap:Header> <t:RequestServerVersion Version="Exchange2013" /> </soap:Header> <soap:Body > <m:FindPeople> <tns:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/> <tns:ParentFolderId> <t:DistinguishedFolderId Id="contacts"/> </tns:ParentFolderId> </tns:FindPeople> </soap:Body> </soap:Envelope>
The following example shows a successful response to a FindPeople WSDL operation request.
-
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <h:ServerVersionInfo MajorVersion="15" MinorVersion="0" MajorBuildNumber="349" MinorBuildNumber="0" Version="Exchange2013" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" /> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <FindPeopleResponse ResponseClass="Success" xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"> <ResponseCode>NoError</ResponseCode> <People> <Persona xmlns="http://schemas.microsoft.com/exchange/services/2006/types"> <PersonaId Id="AAQkAGQ1MjJjMTBkLTc4Y2UtNDA5Ny04ZjU5LWI3MTYzNGNkZmRkYQAQAOjFqObcLmtOlzlRnHdXQjo=" /> <CreationTime>2012-01-11T22:25:37Z</CreationTime> <DisplayName>Terry Adams</DisplayName> <DisplayNameFirstLast>Terry Adams</DisplayNameFirstLast> <DisplayNameLastFirst>Adams Terry</DisplayNameLastFirst> <FileAs>Adams, Terry</FileAs> <GivenName>Terry</GivenName> <Surname>Adams</Surname> <EmailAddress> <Name>terry@litwareinc.com</Name> <EmailAddress>terry@litwareinc.com</EmailAddress> <RoutingType>SMTP</RoutingType> </EmailAddress> <EmailAddresses> <EmailAddress> <Name>terry@litwareinc.com</Name> <EmailAddress>terry@litwareinc.com</EmailAddress> <RoutingType>SMTP</RoutingType> </EmailAddress> <EmailAddress> <Name>tadams@contoso.com</Name> <EmailAddress>tadams@contoso.com</EmailAddress> <RoutingType>SMTP</RoutingType> </EmailAddress> </EmailAddresses> <RelevanceScore>2147483647</RelevanceScore> </Persona> </People> <TotalNumberOfPeopleInView>1</TotalNumberOfPeopleInView> </FindPeopleResponse> </s:Body> </s:Envelope>