InsideMicrosoft®ExchangeServer2007Web
Services
byDavidSterling;BenSpain;MichaelMainer;Mark
Taylor;HuwUpshall
Publisher:MicrosoftPress
PubDate:November28,2007
PrintISBN-10:0-7356-2392-9
PrintISBN-13:978-0-7356-2392-7
Pages:928
TableofContents|Index
Overview
DivedeepintothearchitectureofExchangeWebServicesand
mastertheintricaciesforaccessingdatawiththenew,unifying
API.ExchangeWebServicesoffersnewfunctionality,replacing
old,disparateAPIs.Thispracticalguideintroducesdevelopers
toExchangeWebServices.Itincludescomprehensive,in-depth
coverageofthearchitectureandkeyfeatures,including
messaging,folders,calendaring,tasks,notifications,searching,
availability,andautodiscovery.Developerswhoaremoving
applicationsusingpreviousAPIstoExchangeWebServiceswill
learnhowtodeterminethecorrectwebservicesconstructsand
theimplicationsofthosedecisions.Thisbookassumesonly
knowledgeofhowtowriteHTTPrequests,butitprovidesproxy
examplesinMicrosoftVisualC#.
InsideMicrosoft®ExchangeServer2007Web
Services
byDavidSterling;BenSpain;MichaelMainer;Mark
Taylor;HuwUpshall
Publisher:MicrosoftPress
PubDate:November28,2007
PrintISBN-10:0-7356-2392-9
PrintISBN-13:978-0-7356-2392-7
Pages:928
TableofContents|Index
Copyright
Acknowledgments
Introduction
PartI:TheBasics
Chapter1.WelcometoExchangeWebServices
WhatIsExchangeWebServices?
DevelopmentEnvironment
SchemaFiles
CodingbyUsingRawXML
Summary
Chapter2.MayISeeYourId?
AccessingYourOwnMailbox
ExchangeWebServicesIndentifiers
DelegateAccess
CultureandYourMailbox
Summary
Chapter3.PropertyPathsandResponseShapes
AnItembyAnyOtherName
InExchangeWebServices,PropertiesAreKing
GetinShape
RelatingPropertyPathstoInstanceElementNames
ChangeKeysandShapes
Summary
PartII:ThingsinYourMailbox
Chapter4.Folders
MailboxStructure
FolderTypes
FolderOperations
ManagedFolders
Summary
Chapter5.Items
WhatIsanItem?
ItemOperations
Summary
Chapter6.ContactsandDistributionLists
WhatIsaContact?
WhatIsaDistributionList?
CreatingaContact
OtherCommonOperations
ContactProperties
CreatingaDistributionList
DistributionListProperties
FindingStoreContactsandDistributionLists
ResolveNames
ExpandDL
Summary
Chapter7.Messages
WhatExactlyIsaMessage?
WhatExactlyIsaRecipient?
TheDispositionofaMessage
MessageProperties
MessageFlags
SendingMessages
ReplyingToandForwardingMessages
Reports
Summary
Chapter8.WorkingwithCalendars
MakingtheComplexUnderstandable
CreatingYourFirstCalendarItem
UnderstandingCalendarItems
GettingAdjacentandConflictingCalendarItems
WorkingwithDate/TimeStrings
WorkingwithDurationStrings
ApplyingBestPracticestoNewCalendarItemInstances
withtheProxyClasses
ViewingItemsonaCalendar
Summary
Chapter9.RecurringAppointmentsandTimeZones
UnderstandingRecurrences
CreatingaRecurringSeries
UpdatingaRecurringSeries
WorkingwithTimeZones
Summary
Chapter10.SchedulingMeetings
CreatingaMeetingandInvitingAttendees
WorkingwithMeetingMessages
RegisteringaMeetingResponse
WorkingwithMeetingResponses
CancellingMeetings
WorkingwithRecurringMeetings
Summary
Chapter11.Tasks
BasicTaskOperations
TaskProperties
TaskRecurrence
Summary
Chapter12.Attachments
WhatAreAttachments?
FileAttachments
ItemAttachments
AttachmentHierarchies
Summary
Chapter13.ExtendedProperties
ALittleBackground
ExtendedPropertiesinExchangeWebServices
UsingExtendedProperties
ManagedFolders
MAPIEntryIds
Summary
PartIII:Searching
Chapter14.SearchingtheMailbox
Restrictions
SearchExpressions
SpecialConsiderations
Summary
Chapter15.AdvancedSearching
Paging
GroupedItemQueries
SearchFolders
WhatAreSearchFolders?
HowAreSearchFoldersCreated?
RetrievingYourSearchFolder
UpdatingYourSearchFolder
WhatElseCanBeDoneOnceSearchFoldersAre
Created?
SearchFoldersandtheFindItemOperations
TheFindItem/SearchFolderBalancingAct
ExchangeWebServicesSearchFolderQuirks
Summary
PartIV:KeepingYouintheLoop
Chapter16.Synchronization
WhatIsSynchonization?
SyncingtheFolderHierarchy
SyncingItemsWithinaFolder
Summary
Chapter17.Notification
WhatIsaNotification?
HowDoSyncandNotificationDiffer?
PullNotifications
PushNotifications
Summary
PartV:AdvancedTopics
Chapter18.ErrorsNeverHappen
SOAPandBatchProcessing
TheNormalMechanism
ResponseMessages
ErrorsandtheProxyClasses
HTTP500StatusCodes
ProgrammingConsistency
BatchStopProcessingErrors
Summary
Chapter19.ServertoServerAuthentication
TheTwoHopProblem
TheBasicPrinciple
MeettheCast
TypesofS2SAuthenticationRequests
NotAllMethodsAreCreatedEqual
GoingBacktoIPS
Summary
Chapter20.Autodiscover
TalkingtoAutodiscover
AutodiscoverProviders
IncorporatingAutodiscoverintoYourClientApplication
Summary
Chapter21.Availability
WhatIsUserAvailability?
UnderstandingtheGetUserAvailabilityRequest
UnderstandingtheGetUserAvailabilityResponse
WorkingwithTimeZoneandMailboxDataPropertiesina
GetUserAvailabilityRequest
WorkingwithFree/BusyInformation
WorkingwithSuggestions
Summary
Chapter22.OutOfOfficeSettings
IntroducingtheSetUserOofSettingsWebMethod
IntroducingtheGetUserOofSettingsMethod
Summary
AbouttheAuthors
DavidSterling
BenjaminSpain
MichaelMainer
MarkTaylor
HuwUpshall
AdditionalResourcesforDevelopersfromMicrosoftPress
VisualBasic2005
VisualC#2005
WebDevelopment
DataAccess
SQLServer2005
OtherDeveloperTopics
MoreGreatDeveloperResourcesfromMicrosoftPress
DeveloperStepbyStep
DeveloperReference
FocusedTopics
Index
Copyright
PUBLISHEDBY
MicrosoftPress
ADivisionofMicrosoftCorporation
OneMicrosoftWay
Redmond,Washington98052-6399
Copyright©2008byBenjaminSpain,DavidSterling,Huw
Upshall,MarkTaylor,andMichaelMainer
Allrightsreserved.Nopartofthecontentsofthisbookmaybe
reproducedortransmittedinanyformorbyanymeanswithout
thewrittenpermissionofthepublisher.
LibraryofCongressControlNumber:2007934740
PrintedandboundintheUnitedStatesofAmerica.
123456789QWT210987
DistributedinCanadabyH.B.FennandCompanyLtd.
ACIPcataloguerecordforthisbookisavailablefromtheBritish
Library.
MicrosoftPressbooksareavailablethroughbooksellersand
distributorsworldwide.Forfurtherinformationabout
internationaleditions,contactyourlocalMicrosoftCorporation
officeorcontactMicrosoftPressInternationaldirectlyatfax
(425)936-7329.VisitourWebsiteat
www.microsoft.com/mspress.Sendcommentsto
Microsoft,MicrosoftPress,ActiveDirectory,ActiveSync,ActiveX,
Expression,FrontPage,IntelliSense,InternetExplorer,MSDN,
Outlook,VisualStudio,Win32,Windows,WindowsNT,and
WindowsPowerShellareeitherregisteredtrademarksor
trademarksofMicrosoftCorporationintheUnitedStatesand/or
othercountries.Otherproductandcompanynamesmentioned
hereinmaybethetrademarksoftheirrespectiveowners.
Theexamplecompanies,organizations,products,domain
names,e-mailaddresses,logos,people,places,andevents
depictedhereinarefictitious.Noassociationwithanyreal
company,organization,product,domainname,e-mailaddress,
logo,person,place,oreventisintendedorshouldbeinferred.
Thisbookexpressestheauthor'sviewsandopinions.The
informationcontainedinthisbookisprovidedwithoutany
express,statutory,orimpliedwarranties.Neithertheauthors,
MicrosoftCorporation,noritsresellers,ordistributorswillbe
heldliableforanydamagescausedorallegedtobecaused
eitherdirectlyorindirectlybythisbook.
AcquisitionsEditor:BenRyan
DevelopmentalEditor:DevonMusgrave
ProjectEditor:VictoriaThulman
EditorialProduction:CustomEditorialProductions,Inc.
TechnicalReviewers:ChristopherSimisonandBobDean
BodyPartNo.X14-06310
Dedication
Thisbookisdedicatedtomylovelywife,Rie.Icouldaskfor
nobetterpartnerinlife.Thankyouforallyourtime,love,
anddedication.Iamtrulyarichmanasaresult.Ilove
you.
—David
ToStacey:YouconvincememoreandmoreeachdaythatI
havefoundtheperfectpartnerinlife.Hereistoouryears
past,andtomany,manymore.ToIsaiah:Daddyisvery
proudofyou,andyouhaveinspiredmemorethenyouwill
everknow.Now,let'sgofindthoseracecars!
—Ben
Idedicatethisbooktomyparents,ManfordandKaren
Mainer,whogavemelifeandsharedwithmewisdomand
lovethatIcherishtothisday.
—Michael
TomywifeJesikaforherloveandencouragement,andto
myparentsfortheirconstantsupport.
—Mark
TomywifeHarmonyandtherestofmyfamily.
—Huw
Acknowledgments
FromDavid
Therearemanypeoplewhohavecontributedtothisbookorto
myownpersonalenrichment.First,toHimwhoisworthyto
"receivepower,andriches,andwisdom,andstrength,and
honour,andglory,andblessing"(Rev5:12),Iameverindebted
toYouforYouredeemedmeandcalledmeYourown,notbymy
meritbutforYourglory.Iwouldalsoliketothankmychildren:
Caleb,Gavin,Paris,Haley,andEvelynforbearingwithmewhile
Ifinishedworkingonthebook.Wewillhaveatickle-monster
andpopcornnightwhenthisisover!
Tomyfellowauthors,thanksforallthetimeandeffortyouput
intowritingthecontentforthisbook.Itwasdemandingand
aboveandbeyondyournormalworkloadatMicrosoft.Youwill
neverlookataWorddocumentwithchangetrackinginthe
samewayagain!
Iwanttothankmytechnicalreviewers,ChrisSimisonandBob
Dean.Chris,youdidanexcellent(andexceedinglythorough)
jobofreviewingthisbook.Youwereatrueadvocateforthe
readerandthisbookisMUCHbetterasaresultofyourhard
work.Thanksfortakingontheprojectandstickingwithit!Bob,
thanksforcomingonboardtokeeptheschedulefromslipping.
Thisbookwasindeedquiteanundertaking,butmoresowas
theExchangeWebServicesoftwarethatthisbookisabout.As
such,IwanttothanktheExchangeWebServicesteamforyour
friendship,teamwork,andtheinnovationthatyoupouredinto
theproduct(orderedbyfirstname):BenSpain,BobCongdon,
ChrisSimison,DavidClaux,GauriDeshpande,HenrikJensen,
HuwUpshall,IlyaSmirnov,JamesShen,JasonHenderson,John
Gibbon,JohnMerrill,KumarswamyValegerepura,MarkTaylor,
MichaelMainer,RahulDhar,RazMathias,RebeccaZou,Rob
McCann,andRobinThomas.KarimBatthish,youhaveavast
amountoftechnicalknowledgeinyourhead—thanksfor
answeringmyquestionsandtakingtimetoexplainthingsso
thoroughly.ElenaKharitidi,thankyouforputtingupwithmy
frequente-mailsabouttheASMXframeworkandserialization;
youarespokenoffondlybytheExchangeWebServicesteam
foryourprompt,kind,andthoroughexplanations.
Totheeditingteam,yourkindattentiontoboththebigand
smalldetailshasmadetheendproductmuchbetterthanthe
draftsIsubmitted:VictoriaThulman,DevonMusgrave,Megan
Smith-Creed,JanClavey,andSarahWalesMcGrath.BenRyan,
thanksforlookingatandtakingthebookproposalthroughthe
approvalprocessinthefirstplace!
Iwanttothankallthepeoplewhoreviewedearlydraftsofthe
chapters:RooseveltSheriff,HenrikJensen,Kumarswamy
Valegerepura,JohnGibbon,WilsonLi,JayaMatthew,Ilya
Smirnov,DavidClaux,andKarimBatthish.Andlastly,Iwould
liketothankmykeyboardandcoffeemakerforbearingwith
theextraloadduringthistime.
FromBen
Tomyfellowauthors,David,Mark,Michael,andHuw,thishas
beenaterrificride.Toourtechnicalreviewer,Chris,youtruly
wenttheextramileandIcouldnothavemadeitsoundlikeI
knewanythingwithoutyourhelp.
FromMichael
First,IwanttothankMartinTracyforinspiringchoicesthat
eventuallyledmetothisbook.Thankyou,Martin.Next,Iwant
tothankDavidSterlingforputtingthisbookprojecttogether.
Hehasvaliantlyledthedevelopmentofthiscontent.Heissuch
avaluableassettoanyproject.Ialsowanttothankmycoauthors,editor,technicalreviewers,thepeopleatMicrosoft
Press,MicrosoftCorporation,andanyotherpersonor
organizationthathascontributedtothecreationofthisbook.
Mostimportantly,Iwanttoacknowledgethecustomer.Without
thecustomers,withoutourpartners,thisbookwouldbea
meaninglessundertaking.Itisthecustomersandtheirdesireto
succeedthatfuelsworkslikethis.Thankyou.
FromMark
Iwouldliketothankallthosewhoreviewedmymaterial,
includingmyfellowauthorsandothercolleagues.Yourtimeand
diligencehelpedmeimprovemyexplanationsandremovethose
sillymistakes.
Introduction
Onemid-yeardayin2006,astheExchangeWebServicesteam
wasfinishingworkonExchange2007,DavidSterlingwalked
intoChrisSimison'sofficeandsaid,"Youmightthinkthisis
crazy,butwhatwouldyouthinkifIwroteabookonExchange
WebServices?"[1]Chriswashismanageratthetimeand
mentionedthatthethoughtwasnotactuallycrazyandthat
severalothershadtossedtheideabackandforth,butnothing
hadbeendecidedyet.Sobeganthestoryofthisyear-long
endeavortotaketheinformationfromthecollectivebrainofthe
ExchangeWebServicesteamandputitinwriting.
[1]ChrisSimisonwastheprimarytechnicalreviewerforthisbook.
Theneedforsuchabookwaswellestablished,beingthat
ExchangeWebServiceswasacompletelynewapplication
programminginterface(API)forExchange.Thematerialthat
neededtobecoveredwascertainlythere,ascanbeseenby
thesizeofthisbook.However,whatwehadnotyetdetermined
washowtopresentthematerialandwhotheintendedaudience
wouldbe.Yousee,aWebServicebynaturedealswithSimple
ObjectAccessProtocol(SOAP)XMLmessages,whichcanbe
createdandconsumedonanyoperatingsystemthatknows
howtodealwithtext.SothenaturalwaytotalkaboutaWeb
ServiceAPIistotalkabouttheXMLschemathatdefinesthe
structureoftherequestandresponsemessagesandtoshow
examplesofcompliantXMLinstancedocumentsrepresenting
thosemessages.Suchapresentationappealstoussincewe
spendsomuchtimedealingwithrawXML.Inaddition,since
SOAPmessagesrepresentthe"native"waytocommunicate
withWebServices,suchapresentationcouldbeunderstoodby
thosedevelopingonnon-Microsoftplatformsasthereareno
Microsoft-specificconstructsthatgetintheway.
However,wealsowentwiththeassumptionthatmanyofour
readerswouldbedevelopingapplicationsontheMicrosoft
platform,andmostofthosewouldbeusingVisualStudio2003
or2005astheirdevelopmentenvironment.Asyouwillseein
Chapter1,VisualStudiosimplifiesWebServicecommunication
bycreatingauto-generatedproxyclassesthatdealwithXML
generationandparsingunderthecovers.However,theproxy
generatorusedbyVisualStudioisnottheonlyproxygenerator
available.Infact,withtheadventofWindowsCommunication
Foundation(WCF)intheMicrosoft.NET3.0framework,
Microsofthasreleasedanotherutility(svcutil.exe)that
generatesadifferentsetofauto-generatedproxyclassesthat
canbeusedtotalktoaWebService.Andofcourse,thereare
proxygeneratorsforotherplatformssuchasAxisforJava.
AlthoughtalkingabouttheXMLmessagestructureisconvenient
forinstruction,inpracticemostdeveloperswillbeusingautogeneratedproxyclassestomanagetheircommunicationwith
ExchangeWebServices.Butwhichsetofproxyclassesshould
weusewhenwritingthisbook?Intheend,wedecidedthatthe
mostusedproxygeneratorfortalkingwithExchangeWeb
ServiceswouldbetheoneusedbyVisualStudio2003or2005.
[2]Assuch,inadditiontodiscussingtherawXMLstructureof
theSOAPmessagespassedbetweenaclientapplicationand
ExchangeWebServices,wealsoincludeanumberofexamples
ofhowtoprogramusingtheauto-generatedproxyclasses.
[2]AtleastuntilthenextversionofVisualStudioisofficiallyreleased.
So,thegeneralpatterninthebookisthatwefirstpresentthe
conceptusingXMLandXMLschemaandthenmakethat
conceptmoreconcretebywritingproxyclasscodetoshowthe
conceptatwork.
WhatDoesThisBookCover?
Thisbookisdividedintofiveparts.Eachpartcontainschapters
thatareinsomewayrelated(verylooselyinsomecases).The
partsareasfollows:
PartI:TheBasics
Whileitwouldhavebeenniceforagivenchaptertobeableto
standonitsown,Chapter4throughChapter22assumethat
thereaderhasagoodunderstandingofthecontentinPartI,
whichcontainsChapter1throughChapter3.Assuch,we
stronglyrecommendthatyouspendsometimeonthefirst
threechaptersbeforeskippingaround.PartIcoverssuch
conceptsasthefollowing:
UsingVisualStudiotogeneratetheproxyclassesfortalking
toExchangeWebServices(Chapter1)
UnderstandingtheschemaandWSDLfilesthatdefinethe
ExchangeWebServicescontract(Chapter1)
Understandingitemandfolderidentifiers(Chapter2)
Understandingpropertypathsandresponseshapes
(Chapter3)
PartII:ThingsinYourMailbox
Amailboxisn'tveryinterestingifthereisnothinginit.Assuch,
PartIIcoversalloftheitemandfoldertypesthatcanexistina
mailbox(withtheexceptionofsearchfolders,whichare
coveredinPartIII,Chapter15).PartIIcoversFolders(Chapter
4),Items(Chapter5),ContactsandDistributionLists(Chapter
6),Messages(Chapter7),Calendarrelateditems(Chapter8
throughChapter10),Tasks(Chapter11),andAttachments
(Chapter12).PartIIconcludeswithanindepthdiscussionof
accessingnativeMAPIpropertiesusingExchangeWebServices
extendedproperties,whichisanimportantchaptersinceyou
willseeextendedpropertiesusedthroughoutthebook(Chapter
13).
PartIII:Searching
PartIIIdiscussestherestrictionarchitectureinExchangeWeb
Services.RestrictionsprovideawayforExchangeWebService
consumerstosearchforitemsorfoldersthatmeetacertainset
ofcriteria(Chapter14).Inaddition,advancesearching
functionalitysuchaspaging,grouping,andsearchfoldersare
discussed(Chapter15).
PartIV:KeepingYouintheLoop
PartIVcoverstheExchangeWebServicefunctionalityusedto
alertyouofchangestothecontentofaMailbox.The
Synchronization(Chapter16)andNotification(Chapter17)
chaptersdiscussthefeaturesofeachandwhenyouwould
chooseoneovertheother.
PartV:AdvancedTopics
Thelastsectionofthebookcoversvariousandsundrytopics
thatdefiedcategorization.
Chapter18coverserrorhandlinginExchangeWebServices.
ExchangeWebServicesisabatchingAPI,andthereforeerrors
arereportedinaslightlydifferentfashionthanyoumaybe
usedto.Inaddition,youwillencounterSOAPfaults,whichare
aby-productofcommunicatingviaSOAPmessages.
Chapter19discussesServertoServer(S2S)authentication,
whichallowsproperlyconfiguredaccountstoperformworkon
behalfofanotheraccount.S2SauthenticationenablesExchange
WebServicestobeleveragedaspartofamoreelaboratework
processwithouthavingtosetupacomplexsingle-sign-on
solutionorWindowsKerberosConstrainedDelegation.
Chapter20coversAutodiscover,whichenablescallersto
determinethecorrectClientAccessServertousewhentalking
toExchangeWebServices.Infact,MicrosoftOfficeOutlook
2007usesAutodiscovertoautomaticallyconfigurenew
Exchange2007mailboxaccounts.
Chapter21andChapter22coverthethreeAvailabilityWeb
methods.GetUserAvailabilityisusefulwhentryingtodetermine
thebesttimetoscheduleameeting.GetUserOofSettingsand
SetUserOofSettingsallowyoutoretrieveandset(respectively)
theOutofOffice(OOF)configurationforamailboxaccount.
WhoIsThisBookFor?
Thisbookisprimarilyaimedatdeveloperswhowillbewriting
applicationsthatuseExchangeWebServicestotalkto
ExchangeServer2007.Weassumethatthereaderis
comfortablewiththeMicrosoft.NET2.0frameworkandtheC#
programminglanguage.Forinstance,manyoftheC#examples
inthisbookmakeuseofpartialclassextensionsandgenerics.
Inaddition,weassumeabasicfamiliaritywithXML.Wedonot,
however,assumethatthereaderhashadanyexposureto
programmingagainstExchangeusinganyotherAPI.
CompanionWebSite
OnthecompanionWebsite,you'llfindfourtastefullyappointed
appendicesthatwillproveusefulinyourExchangeWebService
developmentexperience.
AppendixA"ResponseCodes,"providestheerrorresponse
codesthataredefinedintheExchangeWebServicesschema,
whattheymean,andwhatWebmethodsyoumayencounter
themfrom.
AppendixB,"CalendaringSupplementals,"providesadditional
sourcecodetoaidincalendaringdevelopment.
AppendixC,"MappingtoMAPIProperties,"talksaboutthe
propertypathsexposedinExchangeWebServices,theMAPI
propertiesthateachmapsto(ifapplicable),andtheoperations
thatcanbeperformedoneachproperty.
AppendixD,"SP1FeatureReview,"offersaquickviewofthe
ExchangeWebServicefeaturesthatareexpectedtobe
releasedinExchange2007ServicePack1.Notethatthisbook
doesnotcoverSP1features.
Allthecodesamplesdiscussedinthisbookcanbedownloaded
fromthebook'scompanionWebpageatthefollowingaddress:
/>
SystemRequirements
TouseMicrosoftExchange2007WebServices,youmusthave
accesstoanExchange2007ClientAccessServer.Several
chapterscovertopicsthatrequireadministrativeprivilegesin
ExchangeandtheActiveDirectory.However,insuchcases,you
cansimplyfollowalonginthebookifyoudonothave
administrativeprivilegesonyourExchangeServer.
Ifyouareusingtheauto-generatedproxyclassesorcoding
usingoneofthe.NETlanguages,thenthefollowingisrequired:
Microsoft.NET2.0frameworkSDK(includedwithall
versionsofVisualStudio2005)
TheC#examplesinthisbookwerewrittenandcompiledin
VisualStudio2005Professionaledition,althoughyoucanalso
useanothertexteditorandcompilethemusingthecommandlineC#compiler(csc.exe)includedwiththeMicrosoft.NET2.0
frameworkSDK.
SupportforThisBook
MicrosoftPressprovidessupportforbooksandcompanion
contentatthefollowingWebsite:
/>
QuestionsandComments
Ifyouhavecomments,questions,orideasregardingthebook
orthecompanioncontent,orquestionsthatarenotanswered
byvisitingthesitesjustlisted,pleasesendthemtoMicrosoft
Pressviae-mailto
Orviapostalmailto
MicrosoftPressAttn:InsideMicrosoftExchangeServer2007WebServices
OneMicrosoftWay
Redmond,WA98052-6399
PleasenotethatMicrosoftsoftwareproductsupportisnot
offeredthroughtheaboveaddresses.
PartI:TheBasics
WelcometoExchangeWebServices
MayISeeYourId?
PropertyPathsandResponseShapes
Chapter1.WelcometoExchangeWeb
Services
Believeitornot,thisisthelastchapterthatwewroteforthe
book.Wefiguredthatitwouldbebettertowritealloftheother
chaptersfirstsoastoknowwhattointroduceratherthan
introducingonethingandthenwritingaboutanother.[1]The
bookthatisbeforeyouisanexhaustivelookattheMicrosoft
ExchangeServer2007WebServices(EWS)application
programminginterface(API).Throughoutthisbook,we'vetried
togiveyouanunderstandingofwhytheExchangeWeb
Servicesdevelopmentteamdidthingsthewaytheydid.You
see,developingsoftwareisaprocess.Theconsumerwill
typicallyseetheendproductasifitmagicallypoppedoutof
thinair.Butitdidn'tmagicallyappear.Thereweremeetings,
specs,codingsessions,coffee,codereviews,debugging
sessions,coffee,testing,explanations,eurekamoments,coffee,
andsoonthatconstitutetheAPIcoveredbythisbook.TheAPI
grewoutoftheseexperiences—theexperiencesofthe
developers,testers,programmanagers,documenters,and
othermembersthatmakeuptheExchangeWebServicesteam.
Itisourgoalthatyouwillnotonlyunderstandhowtoprogram
onExchangeusingExchangeWebServices,butalsowhythe
ExchangeWebServicesteamdesigneditthewaytheydid.
[1]Thisbookwasoriginallysupposedtobeabouthouseframing,soweare
indeedgladthatwepostponedwritingthischapteruntileverythingelsewas
done.
WhatIsExchangeWebServices?
SowhatpreciselyisExchangeWebServices?Firstand
foremost,ExchangeWebServicesisanapplication
programminginterfacethatthird-partydeveloperscanuseto
communicatewithMicrosoftExchange2007.Thisinterfaceis
exposedasaSimpleObjectAccessProtocol(SOAP)-basedWeb
service,whichmeansthatcallersmustsendtheirrequeststo
ExchangeWebServicesasSOAP+XMLmessagescontainedin
anHTTPPOSTrequest.ExchangeWebServicesitselfwill
respondwithSOAP+XMLmessagesintheHTTPresponse.
ExchangeWebServicesisexposedonanExchangeClient
AccessServer(CAS)throughanASP.NET2.0Webservice
namedExchange.asmx.
Apartfromitsphysicalaspects,ExchangeWebServices
providesawayforconsumerstointeractwithExchange
mailboxesinaMicrosoftOfficeOutlook-andOutlookWeb
Access(OWA)–compatiblemanner.Infact,underthecovers,
OutlookWebAccessandExchangeWebServicesusethesame
businesslogiclayerforaccessing,creating,modifying,and
deletingmailboxdata.
WhatDoesItCover?
ExchangeWebServicessurfacesfunctionalitythatisprimarily
ofinteresttomailboxownersoraccountsthatwanttodo
somethingonbehalfofmailboxowners.Thismeansthatyou
willfindmethodstomanipulateprivatemailboxdatabase
informationsuchasfolders,messages,calendaritems,
contacts,andtasks.WhatExchangeWebServicescoversisthe
subjectofthisbook.
WhatFeaturesAreMissing?
TheRTMversionofExchangeWebServicesoffersagreatdeal
offunctionality.However,severalsignificantareasaremissing.
FolderAssociatedInformation(FAI)messages
Mostdelegateaccessscenarios
PublicFoldersupport
Administrativefunctionality(managingExchange)
Folderaccesscontrollists(ACLs)
Delegatemanagement
RestassuredthattheExchangeWebServicesteamisworking
ontheseissuesandmore.Ifyouneedsuchfunctionality,you
willhavetocontinueusingyourlegacyAPIsuntilthis
functionalityisprovidedbyExchangeWebServices.We
encourageyoutovisittheTechNetforumsandlettheExchange
WebServicesdevelopersknowwhichlegacyfeaturesyouwant
toappearinExchangeWebServices.Thedevelopmentforumis
locatedhere:[2]
[2]Andyes,coffee-infusedmembersoftheEWSteamdoindeedreadand
respondtothese,butonlyifyouarevery,verypolite.
/>ForumID=838&SiteID=17
WhichAPIsIsItMeanttoReplace?
MicrosofthasbeenextremelygenerouswiththeirAPIs,
especiallywhenitcomestoExchange.Infact,ifyouincludeAPI
versionupdatesandextensions,you'llrealizethatMicrosofthas
shippedseveraldozenAPIs,asshowninFigure1-1,that
overlapinmanyplaces.
Figure1-1.ShippingAPIsforExchange
[Viewfullsizeimage]