WCF Guidance for Mobile Developers
Michele Leroux Bustamante and Nickolas Landry, May 2009
wcfguidanceformobile.codeplex.com Page 1
Contents
The State of Windows Mobile Today ............................................................................................................ 4
Windows Mobile Devices .......................................................................................................................... 5
Pocket PCs (Windows Mobile 6 Professional/Classic) .......................................................................... 5
Smartphones ......................................................................................................................................... 6
.NET Compact Framework ........................................................................................................................ 6
Remote Communications with Mobile Devices ........................................................................................ 7
WCF for the Mobile Developer ..................................................................................................................... 9
Setting Up Your Mobile Development Environment .................................................................................. 11
Visual Studio 2008 Professional (and higher) ......................................................................................... 11
Windows Mobile 6 Professional and Standard Software Development Kits Refresh ............................ 12
Microsoft Windows Mobile Device Center 6.1 for Windows Vista ........................................................ 12
Power Toys for .NET Compact Framework 3.5 ....................................................................................... 14
Final Steps ............................................................................................................................................... 14
Getting Started: Your First Mobile + WCF Application ............................................................................... 14
Creating and Hosting the WCF Service ................................................................................................... 15
Creating a Simple Mobile Application ..................................................................................................... 17
Proxy Generation for Mobile Applications ............................................................................................. 19
Testing the Solution ................................................................................................................................ 21
Contract Design ........................................................................................................................................... 22
Service Contracts .................................................................................................................................... 23
Streaming ............................................................................................................................................ 24
Sessions ............................................................................................................................................... 25
Duplex ................................................................................................................................................. 25
Transactions ........................................................................................................................................ 25
Complex Types and Serialization ............................................................................................................ 26
Serialization Architecture .................................................................................................................... 26
Complex Types and Wire Compatibility .............................................................................................. 27
Fault Contracts ........................................................................................................................................ 32
Message Contracts .................................................................................................................................. 32