O'Reilly logo

Inside Microsoft® Exchange Server 2007 Web Services by Huw Upshall, Mark Taylor, Ben Spain, Michael Mainer, David Sterling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Contact

Before you can do anything of interest to a contact, your Mailbox must have a contact. Certainly you could create your contacts through client applications such as Office Outlook or Outlook Web Access, but it is much more fun to do this using Exchange Web Services.

Because a contact is simply an item with a personality, you can create one using the ever-familiar CreateItem call. The only change is that you pass in a Contact element rather than an item or message. Look at the request in Example 6-1.

Example 6-1. Creating a Contact

<CreateItem xmlns=".../messages"
            xmlns:t=".../types">
  <Items>
    <t:Contact>
      <t:GivenName>Jane</t:GivenName>
      <t:Surname>Dow</t:Surname>
    </t:Contact>
  </Items>
</CreateItem>

One thing to notice in Example 6-1 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required