4 Protocol Examples

The following example of a ResolveNames operation shows how to resolve the entry User2.

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   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">
   <soap:Body>
     <ResolveNames xmlns="http://schemas.microsoft.com/exchange/services/2006/messages"                  xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
       ReturnFullContactData="true">
       <UnresolvedEntry>User2</UnresolvedEntry>
     </ResolveNames>
   </soap:Body>
 </soap:Envelope>

The following example shows a successful response to a ResolveNames operation.

 <?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:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Header>
     <t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="685" MinorBuildNumber="8"                             xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
   </soap:Header>
   <soap:Body>
     <ResolveNamesResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"                           xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"                           xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
       <m:ResponseMessages>
         <m:ResolveNamesResponseMessage ResponseClass="Success">
           <m:ResponseCode>NoError</m:ResponseCode>
           <m:ResolutionSet TotalItemsInView="1" IncludesLastItemInRange="true">
             <t:Resolution>
               <t:Mailbox>
                 <t:Name>User2</t:Name>
                 <t:EmailAddress>User2@example.com</t:EmailAddress>
                 <t:RoutingType>SMTP</t:RoutingType>
                 <t:MailboxType>Mailbox</t:MailboxType>
               </t:Mailbox>
               <t:Contact>
                 <t:DisplayName>User2</t:DisplayName>
                 <t:EmailAddresses>
                   <t:Entry Key="EmailAddress1">SMTP:User2@example.com</t:Entry>
                 </t:EmailAddresses>
                 <t:ContactSource>ActiveDirectory</t:ContactSource>
               </t:Contact>
             </t:Resolution>
           </m:ResolutionSet>
         </m:ResolveNamesResponseMessage>
       </m:ResponseMessages>
     </ResolveNamesResponse>
   </soap:Body>
 </soap:Envelope>