Download - The Experts Conference

fishnibblersspongySoftware and s/w Development

Dec 14, 2013 (3 years and 10 months ago)

1,140 views

Microsoft Exchange 2007

Web Services for IT Pros


Who am I?


Ilse Van Criekinge


Exchange MVP


ICT Trainer & Consultant @ Global
Knowledge


http://www.proexchange.be


Ilse.VanCriekinge@GlobalKnowledge.Be


Agenda


Introduction


Exchange Web Services Overview


Autodiscover

Introduction


Exchange Web Services (EWS)


An Application Programming Interface
(API) that you can use to communicate
with Microsoft Exchange 2007


Exposed as a Simple Object Access
Protocol (SOAP)
-
based web service on an
Exchange Client Access Server (CAS)
through an ASP.NET 2.0 Web Service
named Exchange.asmx


Exchange API Evolution

1992

1995

1996

1997

2000

2001

2003

2006

1998

MS Mail 3.0

Simple MAPI 1.0

Windows 95

Extended MAPI

Exchange 4.0

Directory API


Electronic Forms Designer

Exchange Developer Kit Gateway API

OLE Messaging 1.0a (a.k.a. CDO
1.0a)

Common
Messaging Calls 1.0

Exchange 5.0

Active Messaging
1.1 (
a.k.a

CDO 1.1)

Exchange 5.5

Collaborative Data Objects 1.2

CDO Rendering Library
(CDOHTML)

Event Service Agents

NT Option Pack 4.0

CDO for Windows NT (CDONTS)

Exchange 5.5 SP1

CDO 1.2.1

Routing Objects

HTML Forms Converter

Exchange 5.5 SP3

Virus Scanning API 1.0

Exchange
2000

Backup and Restore API (a.k.a. ESEdbcli2)

CDO for Exchange 2000 (
CDOEx
)

CDO for Exchange Management (
CDOExM
)

CDO for Workflow


Exchange Installable File System

Exchange OLEDB provider (
ExOLEDB
)

WSS Forms + FrontPage Extensions

OWA URL commands

Queue Viewer API

Store Events

WebDAV


WMI classes for Exchange management

Workflow Designer for Exchange 2000

Windows 2000

CDO for Windows 2000 (CDOSYS)

SMTP Transport Events

Exchange 2000 SP1

Virus Scanning API 2.0

Exchange 2003

Virus Scanning API 2.5

API Roadmap

Replaced by

Management APIs

CDOExM, Queue Viewer API,

WMI classes for Exchange

PowerShell Cmdlets

Transport APIs

EDK Gateway, Routing Objects,

SMTP Transport Event Sinks

Exchange 2007 Agent API, Foreign
Connectors

Store Access APIs

CDO for Workflow, Workflow Designer,

5.5 Event Service,
ExIFS
, WSS Forms

Windows Workflow Foundation,

ASP.Net

CDO 1.2.1, CDOEx, ExOLEDB, WebDAV

OWA URL commands, Store Events

Web Services for Exchange

Agenda


Introduction


Exchange Web Services Overview


Autodiscover

EWS Overview


Unified, cohesive, open standards
-
based API


Access Microsoft Exchange over HTTP


Includes interoperability with Outlook business logic


Implements the business logic that is required for
complex calendering operations


Runs with requiring custom application code on the
Exchange server


Provides strong typing


Can be used in a managed programming environment
such as Microsoft.Net


SOAP
-
compliant Web service


Creates applications that are easliy redistributable

EWS Overview …cont’d


Exchange Web Services


Business logic layer (shared with Outlook Web Access)

Exchange mailboxes

Public folders

Auto
-
generated
proxies, raw XML

HTTP/SOAP

HTTP/SOAP

Coming soon: EWS
Managed API

or

EWS Overview ...cont’d


Available in Exchange 2007 RTM


Create, get, delete items, folders, and
attachments


Availability, OOF settings, notifications,
synchronization


ResolveNames, ExpandDL, Search


Added in Exchange 2007 Sp1


Delegate management, Folder permissions


Public Folders, Post items


OWA/Availability Id conversion

EWS Client Application

Exchange Web Services

Client Application

Build the XML elements

Create the SOAP message

Serialize the XML message

Create and send the request

Deserialize the XML message

Parse the XML

Consume the XML data

Send request

Receive

response

(c) http://msdn.microsoft.com

Exchange Web Services


Folder Operations


Delegate Management Operations


Item Operations (Message, Contact, Task,
Calendar)


Availability Operations


Messaging Records Management Operations


Notification Operations


Synchronization Operations


Utility Operations


Autodiscover Service

EWS: Getting Started


Use raw XML


Send XML requests


Receive XML responses


Parse XML responses


Use auto
-
generated proxies


Visual Studio 2005, “Add Web Reference”


Visual Studio 2008, “Add Service Reference”


Await EWS Managed API

1. ADD A CONTACT

2. SET OUT OF OFFICE

DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO DEMO

Agenda


Introduction


Exchange Web Services Overview


Autodiscover

What Autodiscover isn’t about


Microsoft Office Outlook 2007 is able to retrieve
the Exchange Server on which the user's
mailbox resides, when:


Exchange 2000 Server and Exchange Server 2003



The client machine is joined to a domain



The Exchange server topology is installed within the
same Active Directory organization as the user object


Exchange Server 2007


The client machine is joined to a domain, or not


The Exchange server topology is installed within the same
Active Directory organization as the user object, or not



Autodiscover = EWS


Deployed with the Client Access Server:


Virtual Directory


Service Connection Point


Used by:


Microsoft Office Outlook 2007


Microsoft Office Communicator 2007 Phone
Edition


Supported Mobile Devices


Developers


Autodiscover is not a SOAP Service


Information provided


Microsoft Office Outlook 2007


The user’s display name


Seperate connection settings for internal and external
connectivity


Location of the user’s Mailbox server


Outlook Anywhere server settings


URLs for


Out of Office Assistant


Free and Busy information


Unified Messaging


Web
-
based offline address book


Microsoft Office Communicator Phone Edition


Outlook Contacts, Call logs and Voice Mails

Connecting to Autodiscover


Microsoft Office Outlook 2007


Domain
-
joined = SCP


External Access or unable to retrieve settings


https://<
smtpdomain
>/autodiscover/autodiscover.xml


https://autodiscover.<
smtpdomain
>/autodiscover/autodiscover.xml


http to https redirect


SP1: _autodiscover._tcp.<
smtpdomain
>


Microsoft Office Communicator 2007 Phone Edition


https://<
smtpdomain
>/autodiscover/autodiscover.xml


https://autodiscover.<
smtpdomain
>/autodiscover/autodiscover.xml


http to https redirect


Does not support SCP or SRV record



Valid Certificate Required


Certificate = valid


Issuer must be trusted by the client


Common Name of the certificate


The certificate must be current and must not be
expired


Note: Microsoft Office Outlook 2007 will not check
if the issuer is trusted when domain
-
joined!


Possible scenarios:


Using a certificate that supports multiple DNS names


Using one single
-
name certificate


Using two single
-
name certificates


Using the Autodiscover service with redirection

Supported Scenarios

Scenario

Pros

Cons

Single certificate that
supports multiple
DNS names



b慳礠t漠業灬敭敮t



p異灯牴r

慬氠捬楥n琠c潮湥捴楯湳



䡩杨er

c潳琠捥牴楦楣at攠瑹灥 ⡕E 捥牴楦楣at攩



A摤楴楯i慬 c潮晩f畲a瑩潮 睨敮 畳敤 睩瑨w䥓A
p敲v敲 ㈰〴⼲〰S

p楮杬g
-
湡浥m
捥牴楦楣at攠慮搠潮攠
web site



Easy to implement



p異灯牴r

浯m琠捬楥n琠c潮湥捴楯湳



Least expensive



Modification of SCP object required



M潤楦ica瑩潮

潦o䕸捨慮g攠p敲癩捥猠roi猠r敱畩r敤



Requires Microsoft Office Outlook Update
(Q939184) or Microsoft Office 2007Sp1



o敱畩r敳e獵s灯牴r晲潭oa乓 灲潶o摥爠f潲
A畴潤楳i潶敲 po嘠r散潲d



a潥猠湯琠獵s灯牴rC潭o畮楣at潲 偨潮攠㈰〷

Two

獩湧汥
-
湡浥m
捥牴楦楣at敳e慮搠瑷漠
w敢 獩s敳



i潷敲 c潳琠瑨t琠rC 捥牴楦楣ate



䉯瑨t獩s敳e慲攠獥捵r敤 b礠ppi



p異灯牴r

慬氠捬楥n琠c潮湥捴楯湳



o敱畩r敳e慤摩瑩潮慬 灵扬楣 䥐f慤摲敳e

Single
-
name

certificate with
Redirect



No need for additional

certificate



No additional cost



p異灯牴r

慬氠捬楥n琠c潮湥捴楯湳



Requires additional public IP address

(c) http://technet.microsoft.com

Get a Valid Certificate


New
-
ExchangeCertificate


GenerateRequest


DomainName


IncludeAutodiscover


PrivateKeyExportable


Install and Enable the SSL certificate


Import
-
ExchangeCertificate


Enable
-
ExchangeCertificate


Exchange Configuration


Internal configuration = Modification of
SCP object


Get
-
ClientAccessServer
<name CAS>
| Fl
autodiscover*


Set
-
ClientAccessServer
<name CAS>
-

AutodiscoverServiceInternalUri <
wanted
URL>

Exchange Configuration
...cont’d


Outlook Anywhere


Enable
-
OutlookAnywhere


Offline address book (EMS or EMC)


Get
-
OABVirtualDirectory | fl name,*url


Set
-
OABVirtualDirectory



InternalURL



ExternalURL

Exchange Configuration
...cont’d


Unified Messaging


Get
-
UMVirtualDirectory | fl name,*url


Set
-
UMVirtualDirectory


InternalURL


ExternalURL


Out of Office & Free and Busy


Get
-
WebServicesVirtualDirectory | fl name,*url


Set
-
WebServicesVirtualDirectory


InternalURL


ExternalURL



A nice Autodiscover trick


Situation: Move user x from organization A
to organization B.


Organization A = ProExchange.Global


Organization B = Sunshine.Edu +
ProExchange.Global


User x has two smtp addresses:


SMTP:
userx@ProExchange.Global


Smtp:
userx@Sunshine.Edu

A nice Autodiscover trick
...Cont’d


Outlook 2007 will connect use primary
SMTP address to locate Autodiscover
information


Internally = no problem (SCP)


Externally = there is a problem


Solution = XML File

XML file usage


Create XML File









Edit Registry


Refer to XML file

HKCU
\
Software
\
Microsoft
\
Office
\
12.0
\
Outlook
\
Autodiscover

STRING_value
<your_namespace>

= path to XML file


Force Outlook to use local XML (optional)

HKCU
\
Software
\
Microsoft
\
Office
\
12.0
\
Outlook
\
Autodiscover

DWORD_value, PreferLocalXML = 1

The trick in Action


Thank You

Ilse.VanCriekinge@GlobalKnowledge.Be

References


Inside Microsoft Exchange Server 2007
Web Services, Microsoft Press


ISBN
-
13:978
-
0
-
7356
-
2392
-
7


ISBN
-
10:0
-
7356
-
2392
-
9


http://msdn.microsoft.com


http://msexchangeteam.com


http://gsexdev.blogspot.com/


http://www.proexchange.be